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

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

@@ -40,7 +40,7 @@ const InAppNotificationDropdown: FC = (props) => {
     console.log(props);
 
     const socket = props.socketIoContainer.getSocket();
-    socket.on('InAppNotification count update', (data: { user: string, count: number }) => {
+    socket.on('InAppNotification:countUpdate', (data: { user: string, count: number }) => {
       // eslint-disable-next-line no-console
       console.log('socketData', data);
 

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

@@ -34,7 +34,7 @@ export default class InAppNotificationService {
   emitSocketIo = async(user) => {
     if (this.socketIoService.isInitialized) {
       const count = await this.getUnreadCountByUser(user);
-      await this.socketIoService.getDefaultSocket().emit('InAppNotification count update', { user, count });
+      await this.socketIoService.getDefaultSocket().emit('InAppNotification:countUpdate', { user, count });
     }
   }