Shun Miyazawa 4 лет назад
Родитель
Сommit
6c593cfbd6

+ 1 - 1
packages/app/src/components/InAppNotification/InAppNotificationDropdown.tsx

@@ -37,7 +37,7 @@ const InAppNotificationDropdown: FC<Props> = (props: Props) => {
 
   const initializeSocket = (props) => {
     const socket = props.socketIoContainer.getSocket();
-    socket.on('commentUpdated', (data: { userId: string, count: number }) => {
+    socket.on('notificationUpdated', (data: { userId: string, count: number }) => {
       if (data.userId === props.currentUserId) {
         setCount(data.count);
       }

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

@@ -34,7 +34,7 @@ export default class InAppNotificationService {
       targetUsers.forEach(async(userId) => {
         const count = await this.getUnreadCountByUser(userId);
         await this.socketIoService.getDefaultSocket()
-          .emit('commentUpdated', { userId, count });
+          .emit('notificationUpdated', { userId, count });
       });
     }
   }