jlcvp / fcm-node

A Node.JS simple interface to Google's Firebase Cloud Messaging (FCM) for Android & iOS & Web Notification and data push
MIT License
125 stars 46 forks source link

question #90

Closed shaheerahmed1997 closed 2 years ago

shaheerahmed1997 commented 2 years ago

what is collapse key as you have mentioned in the example?

jlcvp commented 2 years ago

collapse key is used to "collapse" an older notification of the same collapse key. For example, if I have a package tracking app and a package status is modified to IN TRANSIT, then, DELIVERED. The only information that matters to be in a notification is the last one. I can use the same collapse_key for both, so when the DELIVERED notification arrives, if the user haven't seen the IN TRANSIT the OS will replace the older notification with the newer one.

jlcvp commented 2 years ago

Additionally, this lib is becoming strongly deprecated and I do not intend to keep the support for it any further, please use the official firebase sdk for node.