瀏覽代碼

add comment

Shun Miyazawa 4 年之前
父節點
當前提交
c0e0bdf27b
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      packages/app/src/server/service/in-app-notification.ts

+ 2 - 0
packages/app/src/server/service/in-app-notification.ts

@@ -35,6 +35,8 @@ export default class InAppNotificationService {
   emitSocketIo = async(userId, pageId) => {
     if (this.socketIoService.isInitialized) {
       const count = await this.getUnreadCountByUser(userId);
+
+      // emit to the room for each page
       await this.socketIoService.getDefaultSocket()
         .in(getRoomNameWithId(RoomPrefix.PAGE, pageId))
         .except(getRoomNameWithId(RoomPrefix.USER, userId))