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

Reuse existing messages when using MessagingStyle #1781

Closed
wants to merge 3 commits into from

Conversation

dpalou
Copy link
Contributor

@dpalou dpalou commented Apr 17, 2019

With this fix, users won't have to cache the messages in their Javascript code, the plugin will automatically check if there is an active notification with that ID and append the new messages to the existing ones. This will only be done when using MessagingStyle.

I decided to initialize the sender as "" instead of "Me" because this way users will be able to implement notifications for private conversations like in Telegram or WhatsApp, where the sender isn't displayed.

I also added the option to append the count of messages to the title, like messaging apps do.

Finally, I'm sending the app name as a tag to the notify call to make this plugin compatible with phonegap-plugin-push. Now both plugins will use the same tag, so they'll both be able to append new messages to the same notification when using MessagingStyle (I sent a PR to support MessagingStyle in that plugin).

@dpalou
Copy link
Contributor Author

dpalou commented Aug 14, 2024

Closing this PR as the changes were included in #2027

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

Successfully merging this pull request may close these issues.

1 participant