kaori 4 лет назад
Родитель
Сommit
9d368a1f63
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      packages/app/src/server/models/in-app-notification.ts

+ 3 - 3
packages/app/src/server/models/in-app-notification.ts

@@ -43,7 +43,7 @@ export interface InAppNotificationModel extends Model<InAppNotificationDocument>
 }
 
 export default (crowi: Crowi) => {
-  const inAppCommentEvent = crowi.event('inAppNotification');
+  const commentEvent = crowi.event('comment');
 
   const inAppNotificationSchema = new Schema<InAppNotificationDocument, InAppNotificationModel>({
     user: {
@@ -140,7 +140,7 @@ export default (crowi: Crowi) => {
     const inAppNotification = await InAppNotification.findOneAndUpdate(query, parameters, options);
 
     if (inAppNotification) {
-      inAppCommentEvent.emit('update', inAppNotification.user);
+      commentEvent.emit('update', inAppNotification.user);
     }
 
     return inAppNotification;
@@ -175,7 +175,7 @@ export default (crowi: Crowi) => {
 
     const inAppNotification = await InAppNotification.findOneAndUpdate(query, parameters, options);
     if (inAppNotification) {
-      inAppCommentEvent.emit('update', inAppNotification.user);
+      commentEvent.emit('update', inAppNotification.user);
     }
     return inAppNotification;
   };