Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only attach image if related #18

Closed
luke- opened this issue Mar 28, 2023 · 4 comments
Closed

Only attach image if related #18

luke- opened this issue Mar 28, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@luke-
Copy link
Contributor

luke- commented Mar 28, 2023

Currently, an image is added with each notification. If none is available from the context, the logo/space image is added.

We should only attach an image if one is available from the context (e.g. first image in the post, attachment file).

@luke- luke- added the enhancement New feature or request label Mar 28, 2023
@luke-
Copy link
Contributor Author

luke- commented Mar 28, 2023

See also: humhub/app#57

@luke- luke- assigned serh-mosk and unassigned yurabakhtin Apr 18, 2023
@serh-mosk
Copy link
Contributor

@luke- Can you explain in more detail in which cases, where exactly to add which images? Can you add screenshots for better understanding? Where can I see the app to test it? Also, based on the context, you need to have access to the Cloud Messaging options at https://console.firebase.google.com. Can you provide all of these? Locally, I was not able to configure the process of receiving the appropriate push notifications, although I figured out how it works in the code. I also want to note that, having experience from previous projects, the push message should have a project icon and, if necessary, you can add an image to the content of the message itself.

@luke-
Copy link
Contributor Author

luke- commented Apr 23, 2023

@yuriimaz Thanks for your investigation. Seems the issue was not quite true. It seems that we currently always the SiteIcon is added to the notification as image.

https://github.com/humhub/fcm-push/blob/master/services/MessagingService.php#L33

The intention should be to attach an image to the notification only if there is an image attached to the notification source. (e.g. the notification is about a Post with an attached image).

Currently it would be ok not to add any image at all to the notification for now.

I'll do this, because it's too much overheat to spin up a Firebase test project for this.

@luke- luke- closed this as completed in a2a5b9e Apr 23, 2023
@luke-
Copy link
Contributor Author

luke- commented Apr 23, 2023

I've created a new issue #21 for possible future developments about this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants