From 56c7241c2ff3e62b2f6f8064f985181f4387dd3d Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 19 May 2023 02:37:30 +0300 Subject: push-notifications: delete fcm tokens failed with `InvalidRegistration` --- vnext/server/sender.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vnext/server') diff --git a/vnext/server/sender.js b/vnext/server/sender.js index db006233..7c72cbf3 100644 --- a/vnext/server/sender.js +++ b/vnext/server/sender.js @@ -71,7 +71,7 @@ export function sendNotification(productionIds, sandboxIds, data) { }); results.filter(r => r.method === 'gcm') .forEach(async r => { - let badTokens = r.message.filter(m => m.errorMsg === 'NotRegistered' || m.errorMsg === 'MismatchSenderId').map(m => { + let badTokens = r.message.filter(m => m.errorMsg === 'NotRegistered' || m.errorMsg === 'MismatchSenderId' || m.errorMsg === 'InvalidRegistration').map(m => { return { 'type': 'fcm', 'token': m.regId }; }); if (badTokens.length > 0) { -- cgit v1.2.3