Shun Miyazawa 3 лет назад
Родитель
Сommit
fc6e3a7e02
1 измененных файлов с 2 добавлено и 5 удалено
  1. 2 5
      packages/app/src/server/events/activity.ts

+ 2 - 5
packages/app/src/server/events/activity.ts

@@ -11,21 +11,18 @@ const util = require('util');
 
 
 function ActivityEvent(crowi: Crowi) {
 function ActivityEvent(crowi: Crowi) {
   this.crowi = crowi;
   this.crowi = crowi;
-  this.inAppNotificationService = crowi.inAppNotificationService;
 
 
   events.EventEmitter.call(this);
   events.EventEmitter.call(this);
 }
 }
+util.inherits(ActivityEvent, events.EventEmitter);
 
 
 ActivityEvent.prototype.onUpdate = async function(activity: ActivityDocument, target: IPage) {
 ActivityEvent.prototype.onUpdate = async function(activity: ActivityDocument, target: IPage) {
   try {
   try {
-    await this.inAppNotificationService.createInAppNotification(activity, target);
+    await this.crowi.inAppNotificationService.createInAppNotification(activity, target);
   }
   }
   catch (err) {
   catch (err) {
     logger.error('Create InAppNotification failed', err);
     logger.error('Create InAppNotification failed', err);
   }
   }
 };
 };
 
 
-util.inherits(ActivityEvent, events.EventEmitter);
-
-
 module.exports = ActivityEvent;
 module.exports = ActivityEvent;