Yuki Takei 2 miesięcy temu
rodzic
commit
07751f6420

+ 7 - 5
apps/app/src/server/service/global-notification/global-notification-mail.js

@@ -35,11 +35,13 @@ class GlobalNotificationMailService {
   async fire(event, page, triggeredBy, vars) {
   async fire(event, page, triggeredBy, vars) {
     const { mailService } = this.crowi;
     const { mailService } = this.crowi;
 
 
-    const notifications = await GlobalNotification.findSettingByPathAndEvent(
-      event,
-      page.path,
-      GlobalNotificationSettingType.MAIL,
-    );
+    const { GlobalNotificationSetting } = this.crowi.models;
+    const notifications =
+      await GlobalNotificationSetting.findSettingByPathAndEvent(
+        event,
+        page.path,
+        GlobalNotificationSettingType.MAIL,
+      );
 
 
     const option = this.generateOption(event, page, triggeredBy, vars);
     const option = this.generateOption(event, page, triggeredBy, vars);
 
 

+ 7 - 6
apps/app/src/server/service/global-notification/global-notification-slack.js

@@ -40,12 +40,13 @@ class GlobalNotificationSlackService {
   async fire(event, id, path, triggeredBy, vars) {
   async fire(event, id, path, triggeredBy, vars) {
     const { appService, slackIntegrationService } = this.crowi;
     const { appService, slackIntegrationService } = this.crowi;
 
 
-    const { GlobalNotification } = this.crowi.models;
-    const notifications = await GlobalNotification.findSettingByPathAndEvent(
-      event,
-      path,
-      GlobalNotificationSettingType.SLACK,
-    );
+    const { GlobalNotificationSetting } = this.crowi.models;
+    const notifications =
+      await GlobalNotificationSetting.findSettingByPathAndEvent(
+        event,
+        path,
+        GlobalNotificationSettingType.SLACK,
+      );
 
 
     const messageBody = this.generateMessageBody(
     const messageBody = this.generateMessageBody(
       event,
       event,