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

@ -128,10 +128,15 @@ PushNotificationsService.prototype._sendPushNotifications = function(notificatio
"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);