Closed baskin closed 3 years ago
Hi @baskin, the problem is that we use an intermediate lib node-pushnotifications
which calls node-gcm
only with registrationTokens
param (see https://github.com/appfeel/node-pushnotifications/blob/master/src/sendGCM.js#L17) when node-gcm
seems to expect notifications keys in the to
param (https://github.com/ToothlessGear/node-gcm#recipients).
Thanks @BDav24 . I realized that and opened a ticket with `node-pushnotifications. I'll try and have it supported there first and open this back later.
Hi @BDav24 , the maintainers of node-pushnotifications
are working on API changes to support device groups. Please see if you would like to opine on the API on the above ticket.
Hi @BDav24,
the maintainers of node-pushnotifications
have proposed some changes in their library in this ticket.
Would it possible for you to test it out -- such that it fits in with the usage in notifme-sdk
?
From what I understand of the pull request (https://github.com/appfeel/node-pushnotifications/pull/131) and the future documentation (https://github.com/appfeel/node-pushnotifications/tree/dev/fcm-recipients#send-to-custom-recipients-device-groups-or-topics), you'll be able to do:
notifmeSdk.send({
push: {
registrationToken: 'xxxxx', // any string strictly longer than 64 (because of https://github.com/appfeel/node-pushnotifications/blob/master/src/push-notifications.js#L53)
recipients: { to: 'topicName' },
...
}
})
So no code to change (except node-pushnotifications
version upgrade).
@BDav24 @baskin I released the change with v.1.4.0.
So no code to change (except node-pushnotifications version upgrade).
Yes. Looks like.
Thanks @BDav24 and @alex-friedl
Available from https://github.com/notifme/notifme-sdk/releases/tag/v1.10.0
Hi Team, I wasn't able to figure out how to send an FCM notification to a device group. Any help would be greatly appreciated? FWIW, the underlying library used (https://github.com/ToothlessGear/node-gcm) supports sending to device groups.
Thanks,