Forráskód Böngészése

restore isSetupSlackBot

zahmis 5 éve
szülő
commit
52599c646b

+ 1 - 0
src/server/routes/apiv3/slack-integration.js

@@ -106,6 +106,7 @@ module.exports = (crowi) => {
         slackSigningSecret: crowi.configManager.getConfig('crowi', 'slackbot:signingSecret'),
         slackBotToken: crowi.configManager.getConfig('crowi', 'slackbot:token'),
         isConnectedToSlack: crowi.slackBotService.isConnectedToSlack,
+        isSetupSlackBot: crowi.slackBotService.isSetupSlackBot,
       },
       // TODO imple when creating with proxy
       customBotWithProxySettings: {

+ 3 - 0
src/server/service/slackbot.js

@@ -19,6 +19,7 @@ class SlackBotService extends S2sMessageHandlable {
     this.client = null;
     this.searchService = null;
 
+    this.isSetupSlackBot = false;
     this.isConnectedToSlack = false;
 
     this.lastLoadedAt = null;
@@ -27,12 +28,14 @@ class SlackBotService extends S2sMessageHandlable {
   }
 
   async initialize() {
+    this.isSetupSlackBot = false;
     this.isConnectedToSlack = false;
     const token = this.crowi.configManager.getConfig('crowi', 'slackbot:token');
 
     if (token != null) {
       this.client = new WebClient(token, { logLevel: LogLevel.DEBUG });
       logger.debug('SlackBot: setup is done');
+      this.isSetupSlackBot = true;
       await this.sendAuthTest();
     }