From b7fbbf3f91490a488e54fe5f8c700813f0ab8021 Mon Sep 17 00:00:00 2001 From: stone Date: Sat, 18 Feb 2017 22:52:02 -0500 Subject: pushing the push notifications --- lib/okpush/apn.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/okpush/apn.js') diff --git a/lib/okpush/apn.js b/lib/okpush/apn.js index 75322fae..14de7ac8 100644 --- a/lib/okpush/apn.js +++ b/lib/okpush/apn.js @@ -12,12 +12,13 @@ function init (config) { } function push (channel, note) { - db.getAllTokens(note, function(err, tokens){ + db.getAllIOSTokens(channel, function(err, tokens){ if (err) { console.error("Error fetching devices:", err) return } - connection.send(note, tokens).then( function (response) { + console.log(note, tokens) + apnProvider.send(note, tokens).then( function (response) { // response.sent.forEach( function (token) { // notificationSent(user, token) // }) -- cgit v1.2.3-70-g09d2