From 330b744d6f5fd7d7d597fe6ee1de6aa162a631e0 Mon Sep 17 00:00:00 2001 From: Nikolay Dimitrov Date: Thu, 1 Feb 2024 13:37:07 +0900 Subject: [PATCH] Always push notification --- handlers/message.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handlers/message.go b/handlers/message.go index 8973548..04223bb 100644 --- a/handlers/message.go +++ b/handlers/message.go @@ -101,10 +101,10 @@ func sendToSocketAndPush(message NotificationGetter, recipients map[uint64]strin notification := message.getNotification() pushTokens := make([]string, 0, len(recipients)) for userID, pushToken := range recipients { + pushTokens = append(pushTokens, pushToken) clientID := models.GetUserSocketID(userID) connections, exist := connectedUsers.Get(clientID) if !exist { - pushTokens = append(pushTokens, pushToken) continue } // TODO: If initiator, send only confirmation