From 859625a2cd0cce4f5a59a9afd79ff71150f7eedc Mon Sep 17 00:00:00 2001 From: Todd Vrba Date: Thu, 28 May 2020 15:26:34 -0500 Subject: [PATCH] Update README with usage --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d66ccb31..46d01f6e 100644 --- a/README.md +++ b/README.md @@ -126,10 +126,10 @@ sender.send(message, { registrationTokens: registrationTokens }, 10, function (e else console.log(response); }); -// Q: I need to remove all "bad" token from my database, how do I do that? +// Q: I need to remove all "bad" token from my database, how do I do that? // The results-array does not contain any tokens! // A: The array of tokens used for sending will match the array of results, so you can cross-check them. -sender.send(message, { registrationTokens: registrationTokens }, function (err, response) { +sender.send(message, { registrationTokens: registrationTokens }, function (err, response) { var failed_tokens = registrationTokens.filter((token, i) => response[i].error != null); console.log('These tokens are no longer ok:', failed_tokens); }); @@ -167,6 +167,7 @@ This is due to [a restriction](https://firebase.google.com/docs/cloud-messaging/ |dryRun|Optional, JSON boolean|This parameter, when set to true, allows developers to test a request without actually sending a message.| |data|Optional, JSON object|This parameter specifies the custom key-value pairs of the message's payload.| |notification|Optional, JSON object|This parameter specifies the predefined, user-visible key-value pairs of the notification payload. See "Notification payload option table" below for more details.| +|fcm_options|Optional, JSON object|This parameter is used to pass FCM specific options as outlined (here)[https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#FcmOptions]| ## Notification usage