refactor ios payload structure
This commit is contained in:
parent
a01a32b9ed
commit
c43a11d647
|
@ -125,13 +125,18 @@ PushNotificationsService.prototype._sendPushNotifications = function(notificatio
|
||||||
"title": content.plain.subject,
|
"title": content.plain.subject,
|
||||||
"message": content.plain.body,
|
"message": content.plain.body,
|
||||||
"walletId": sjcl.hash.sha256.hash(notification.walletId),
|
"walletId": sjcl.hash.sha256.hash(notification.walletId),
|
||||||
"notId": Math.floor(Math.random()*100000)+1
|
"notId": Math.floor(Math.random() * 100000) + 1
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
opts.ios = {
|
opts.ios = {
|
||||||
"alert": content.plain.body,
|
"alert": {
|
||||||
"sound": "default"
|
"title": content.plain.subject,
|
||||||
|
"body": content.plain.body
|
||||||
|
},
|
||||||
|
"sound": "default",
|
||||||
|
"payload": {
|
||||||
|
"walletId": sjcl.hash.sha256.hash(notification.walletId)
|
||||||
|
}
|
||||||
};
|
};
|
||||||
return next(err, opts);
|
return next(err, opts);
|
||||||
}, next);
|
}, next);
|
||||||
|
|
Loading…
Reference in New Issue