Browse Source

refactor ios payload structure

activeAddress
Gabriel Bazán 9 years ago
parent
commit
c43a11d647
  1. 13
      lib/pushnotificationsservice.js

13
lib/pushnotificationsservice.js

@ -125,13 +125,18 @@ PushNotificationsService.prototype._sendPushNotifications = function(notificatio
"title": content.plain.subject,
"message": content.plain.body,
"walletId": sjcl.hash.sha256.hash(notification.walletId),
"notId": Math.floor(Math.random()*100000)+1
"notId": Math.floor(Math.random() * 100000) + 1
}
};
opts.ios = {
"alert": content.plain.body,
"sound": "default"
"alert": {
"title": content.plain.subject,
"body": content.plain.body
},
"sound": "default",
"payload": {
"walletId": sjcl.hash.sha256.hash(notification.walletId)
}
};
return next(err, opts);
}, next);

Loading…
Cancel
Save