SeVeNDuS / node-onesignal-api

OneSignal's unofficial node.js client library for using OneSignal Rest API.
MIT License
50 stars 11 forks source link

Set notification ID? #12

Open GeoffreyPlitt opened 7 years ago

GeoffreyPlitt commented 7 years ago

In order to prevent duplicates, according to https://documentation.onesignal.com/docs/duplicated-notifications, you're supposed to set a notification ID when calling create().

I don't see this in the documentation, is it possible?

SeVeNDuS commented 7 years ago

Create method generate the notificacion id server side on OneSignal servers. That link talks about SDK side problems, for example, having more than one SDK that can receive notifications.

GeoffreyPlitt commented 7 years ago

@SeVeNDuS Not sure what you mean. I don't want onesignal to auto-generate anything. I want to be able to set the notificationID myself, when creating/sending the notification. This way if I accidentally have two workers that try to send the same notification (two with the same notificationID), they will not be double-delivered.

GeoffreyPlitt commented 7 years ago

Hello, any update?