소스 검색

fix: not be fired when channel is empty

Yuki Takei 4 년 전
부모
커밋
872004cd9e
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      packages/app/src/server/service/user-notification/index.js

+ 4 - 0
packages/app/src/server/service/user-notification/index.js

@@ -44,6 +44,10 @@ class UserNotificationService {
 
     // "dev,slacktest" => [dev,slacktest]
     const slackChannels = toArrayFromCsv(slackChannelsStr);
+    // insert null if empty to notify once
+    if (slackChannels.length === 0) {
+      slackChannels.push(null);
+    }
 
     const appTitle = appService.getAppTitle();
     const siteUrl = appService.getSiteUrl();