diff options
author | Tom Smeding <tom.smeding@gmail.com> | 2020-07-27 17:46:14 +0200 |
---|---|---|
committer | Tom Smeding <tom.smeding@gmail.com> | 2020-07-27 17:46:14 +0200 |
commit | d501368678580c6b7c2f569a0e8086b2e16a1795 (patch) | |
tree | 7c0c7a9e5b291a81bc6b7151c234fb6940c4e071 | |
parent | b51566ad3f8a4a28e7478171c5e23517bd2b4c62 (diff) |
firebase: Use collapse key
-rwxr-xr-x | firebase-io/firebase-io.js | 5 |
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; |