aboutsummaryrefslogtreecommitdiff
path: root/vnext/server
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2023-01-24 01:59:39 +0300
committerGravatar Vitaly Takmazov2023-01-24 02:30:14 +0300
commitf62b6eb75e0a6e8fafbebf3a41b913cd2cb929ed (patch)
tree8e87c9b50a6518d0fedf03956c1769aa680fc4c3 /vnext/server
parent93b812e56856a9426c681d5a783e089bcee3210d (diff)
Web Push
Diffstat (limited to 'vnext/server')
-rw-r--r--vnext/server/middleware/event.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/vnext/server/middleware/event.js b/vnext/server/middleware/event.js
index 838ea8b1..5ea855dd 100644
--- a/vnext/server/middleware/event.js
+++ b/vnext/server/middleware/event.js
@@ -27,8 +27,8 @@ function processMessageEvent(msg) {
users.forEach(user => {
log(`${user.uname}: ${user.unreadCount}`);
let [sandboxTokens, productionTokens] = (user.tokens || [])
- .filter(t => ['mpns', 'apns', 'fcm'].includes(t.type))
- .map(t => t.token)
+ .filter(t => ['mpns', 'apns', 'fcm', 'web'].includes(t.type))
+ .map(t => t.type === 'web' ? JSON.parse(t.token) : t.token)
.reduce((result, element, i) => {
allSandboxIds.includes(user.uid)
? result[0].push(element)