|
|
@ -19,7 +19,7 @@ var BlockchainExplorer = require('./blockchainexplorer'); |
|
|
|
|
|
|
|
var Model = require('./model'); |
|
|
|
|
|
|
|
var PUSHNOTIFICATION_TYPES = { |
|
|
|
var PUSHNOTIFICATIONS_TYPES = { |
|
|
|
'NewCopayer': { |
|
|
|
filename: 'new_copayer', |
|
|
|
notifyDoer: false, |
|
|
@ -46,9 +46,9 @@ var PUSHNOTIFICATION_TYPES = { |
|
|
|
}, |
|
|
|
}; |
|
|
|
|
|
|
|
function PushNotificationService() {}; |
|
|
|
function PushNotificationsService() {}; |
|
|
|
|
|
|
|
PushNotificationService.prototype.start = function(opts, cb) { |
|
|
|
PushNotificationsService.prototype.start = function(opts, cb) { |
|
|
|
var self = this; |
|
|
|
async.parallel([ |
|
|
|
function(done) { |
|
|
@ -64,9 +64,9 @@ PushNotificationService.prototype.start = function(opts, cb) { |
|
|
|
}); |
|
|
|
}; |
|
|
|
|
|
|
|
PushNotificationService.prototype.sendPushNotification = function(notification, cb) { |
|
|
|
PushNotificationsService.prototype.sendPushNotifications = function(notification, cb) { |
|
|
|
console.log(notification); |
|
|
|
if (PUSHNOTIFICATION_TYPES[notification.type] == notification.type) { |
|
|
|
if (PUSHNOTIFICATIONS_TYPES[notification.type] == notification.type) { |
|
|
|
|
|
|
|
if (notification.type == 'NewIncomingTx') { |
|
|
|
var opts = {}; |
|
|
@ -158,4 +158,4 @@ PushNotificationService.prototype.sendPushNotification = function(notification, |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
module.exports = PushNotificationService; |
|
|
|
module.exports = PushNotificationsService; |
|
|
|