From 0a40c0d128f16c71f81c7c08a3b2dc0ce49792c2 Mon Sep 17 00:00:00 2001 From: Javier Date: Wed, 27 Jan 2016 18:18:27 -0300 Subject: [PATCH 1/3] add additional data to be used when notification is clicked --- lib/pushnotificationsservice.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/pushnotificationsservice.js b/lib/pushnotificationsservice.js index 35281da..a200714 100644 --- a/lib/pushnotificationsservice.js +++ b/lib/pushnotificationsservice.js @@ -122,7 +122,8 @@ PushNotificationsService.prototype._sendPushNotifications = function(notificatio opts.android = { "data": { "title": content.plain.subject, - "message": content.plain.body + "message": content.plain.body, + "walletId": notification.walletId, } }; From 831d93ab3bf93e44b0fb1d94e3569883b7004fba Mon Sep 17 00:00:00 2001 From: Javier Date: Thu, 28 Jan 2016 16:40:58 -0300 Subject: [PATCH 2/3] hashing wallet id from notification --- lib/pushnotificationsservice.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/pushnotificationsservice.js b/lib/pushnotificationsservice.js index a200714..4456451 100644 --- a/lib/pushnotificationsservice.js +++ b/lib/pushnotificationsservice.js @@ -10,6 +10,7 @@ var fs = require('fs'); var path = require('path'); var Utils = require('./common/utils'); var Model = require('./model'); +var sjcl = require('sjcl'); var log = require('npmlog'); log.debug = log.verbose; @@ -123,7 +124,7 @@ PushNotificationsService.prototype._sendPushNotifications = function(notificatio "data": { "title": content.plain.subject, "message": content.plain.body, - "walletId": notification.walletId, + "walletId": sjcl.hash.sha256.hash(notification.walletId), } }; From e9275bf232a3df3b3e174740ea12fea73cadeba3 Mon Sep 17 00:00:00 2001 From: Javier Date: Sat, 30 Jan 2016 21:22:48 -0300 Subject: [PATCH 3/3] stacking notifications in android --- lib/pushnotificationsservice.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/pushnotificationsservice.js b/lib/pushnotificationsservice.js index 4456451..4b068ae 100644 --- a/lib/pushnotificationsservice.js +++ b/lib/pushnotificationsservice.js @@ -125,6 +125,7 @@ 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 } };