diff options
Diffstat (limited to 'vnext/server')
-rw-r--r-- | vnext/server/middleware/event.js | 2 | ||||
-rw-r--r-- | vnext/server/sender.js | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/vnext/server/middleware/event.js b/vnext/server/middleware/event.js index 1267d1c4..deb974ee 100644 --- a/vnext/server/middleware/event.js +++ b/vnext/server/middleware/event.js @@ -44,7 +44,7 @@ function processMessageEvent(msg) { users.forEach(user => { log(`${user.uname}: ${user.unreadCount}`); let [sandboxTokens, productionTokens] = (user.tokens || []) - .filter(t => ['mpns', 'apns', 'gcm'].includes(t.type)) + .filter(t => ['mpns', 'apns', 'fcm'].includes(t.type)) .map(t => t.token) .reduce((result, element, i) => { allSandboxIds.includes(user.uid) diff --git a/vnext/server/sender.js b/vnext/server/sender.js index f33eadcf..7adb1ceb 100644 --- a/vnext/server/sender.js +++ b/vnext/server/sender.js @@ -69,10 +69,10 @@ export function sendNotification(productionIds, sandboxIds, data) { log(`${badTokens.length} APNS tokens deleted`); } }); - results.filter(r => r.method === 'gcm') + results.filter(r => r.method === 'fcm') .forEach(async r => { let badTokens = r.message.filter(m => m.errorMsg === 'NotRegistered' || m.errorMsg === 'MismatchSenderId').map(m => { - return { 'type': 'gcm', 'token': m.regId }; + return { 'type': 'fcm', 'token': m.regId }; }); if (badTokens.length > 0) { await deleteSubscribers(badTokens); |