فهرست منبع

added comment emit

kaori 4 سال پیش
والد
کامیت
186e428f6a
1فایلهای تغییر یافته به همراه5 افزوده شده و 0 حذف شده
  1. 5 0
      packages/app/src/server/service/in-app-notification.ts

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

@@ -22,7 +22,12 @@ class InAppNotificationService {
   updateCommentEvent(): void {
     this.commentEvent.on('update', (user) => {
       this.commentEvent.onUpdate();
+
+      if (this.socketIoService.isInitialized) {
+        this.socketIoService.getDefaultSocket().emit('comment updated', { user });
+      }
     });
+
   }
 
   removeActivity = async function(activity) {