aboutsummaryrefslogtreecommitdiff
path: root/firebase-io
diff options
context:
space:
mode:
authorTom Smeding <tom.smeding@gmail.com>2020-07-27 17:46:14 +0200
committerTom Smeding <tom.smeding@gmail.com>2020-07-27 17:46:14 +0200
commitd501368678580c6b7c2f569a0e8086b2e16a1795 (patch)
tree7c0c7a9e5b291a81bc6b7151c234fb6940c4e071 /firebase-io
parentb51566ad3f8a4a28e7478171c5e23517bd2b4c62 (diff)
firebase: Use collapse key
Diffstat (limited to 'firebase-io')
-rwxr-xr-xfirebase-io/firebase-io.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/firebase-io/firebase-io.js b/firebase-io/firebase-io.js
index 9c96224..8ace07c 100755
--- a/firebase-io/firebase-io.js
+++ b/firebase-io/firebase-io.js
@@ -93,7 +93,10 @@ function processMessage(type,fields){
message: message,
}
};
- firebase.messaging().sendToDevice(token,payload)
+ const options={
+ collapseKey: "tomsg-collapseKey",
+ };
+ firebase.messaging().sendToDevice(token,payload,options)
.then((response)=>{
const result=response.results[0];
const realToken=result.canonicalRegistrationToken;