Browse Source

adding ios options

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

8
lib/pushnotificationsservice.js

@ -86,7 +86,7 @@ PushNotificationsService.prototype.start = function(opts, cb) {
PushNotificationsService.prototype._sendPushNotifications = function(notification, cb) {
var self = this;
var url = 'http://192.168.1.128:8000/send';
var url = 'http://192.168.1.143:8000/send';
cb = cb || function() {};
var notifType = PUSHNOTIFICATIONS_TYPES[notification.type];
@ -98,7 +98,6 @@ PushNotificationsService.prototype._sendPushNotifications = function(notificatio
var resultedRecipientsList = _.reject(self._getJoinedRecipientsList(wallet, recipientsList), {
id: notification.creatorId || null
});
async.waterfall([
function(next) {
self._readAndApplyTemplates(notification, notifType, resultedRecipientsList, next);
@ -114,6 +113,11 @@ PushNotificationsService.prototype._sendPushNotifications = function(notificatio
"message": content.plain.body
}
};
opts.ios = {
"badge": 0,
"alert": content.plain.body,
"sound": "soundName"
};
return next(err, opts);
}, next);
},

Loading…
Cancel
Save