ToothlessGear / node-gcm

A NodeJS wrapper library port to send data to Android devices via Google Cloud Messaging
https://github.com/ToothlessGear/node-gcm
Other
1.3k stars 208 forks source link

Supporting delivery_receipt_requested feature #321

Open Rostyk opened 6 years ago

Rostyk commented 6 years ago

Is it possible to add the acknowledgement of the message receipt?

hypesystem commented 6 years ago

Hi @Rostyk, could you elaborate on what you mean with this issue?

A link or a more elaborate description of the feature would be helpful :smile:

Rostyk commented 6 years ago

In the FCM documentation (Receive delivery receipts section) it says:

For Android and Chrome client apps, you can get delivery receipts (sent from FCM to your app server) when a device confirms that it received a message sent by FCM.

So I was wondering if there's a possibility to add delivery_receipt_requested flag so FCM would send a delivery receipt when it receives confirmation that the device received the message.

Rostyk commented 6 years ago

Oh, Sorry, I just realized its GCM. Please disregard.

hypesystem commented 6 years ago

@Rostyk FCM is the new name for GCM. Unfortunately the name "FCM" is taken for npm libraries. This doesn't mean that we won't support FCM features, though, so let's look at this a bit further :smile:

We can definitely support that new parameter. Would you be interested in making a PR for it? We'll be here to guide you through the required changes.

The primary change is adding the parameter to the list of supported ones in message-options.js

We would also need some tests of the new functionality.