aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;