binwiederhier 2 月之前
父节点
当前提交
fd8cd5ca91
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      web/src/components/hooks.js

+ 3 - 1
web/src/components/hooks.js

@@ -50,11 +50,13 @@ export const useConnectionListeners = (account, subscriptions, users, webPushTop
       };
 
       const handleNotification = async (subscriptionId, notification) => {
+        // Note: This logic is duplicated in the Android app in SubscriberService::onNotificationReceived()
+        //       and FirebaseService::handleMessage().
+
         // Delete existing notification with same sid, if any
         if (notification.sid) {
           await subscriptionManager.deleteNotificationBySid(subscriptionId, notification.sid);
         }
-
         // Add notification to database
         if (!notification.deleted) {
           const added = await subscriptionManager.addNotification(subscriptionId, notification);