refactor ios payload structure

This commit is contained in:
Gabriel Bazán 2016-02-09 15:43:11 -03:00
parent a01a32b9ed
commit c43a11d647
1 changed files with 9 additions and 4 deletions

View File

@ -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);