itizawa před 5 roky
rodič
revize
dfb791b6f1
1 změnil soubory, kde provedl 0 přidání a 21 odebrání
  1. 0 21
      src/server/service/bolt.js

+ 0 - 21
src/server/service/bolt.js

@@ -74,32 +74,11 @@ class BoltService {
     }
     }
   }
   }
 
 
-  // Check if the access token is correct
-  isValidAccessToken(body, command) {
-    const slackBotAccessToken = body.slack_bot_access_token || null;
-
-    if (slackBotAccessToken == null) {
-      return false;
-    }
-    return slackBotAccessToken === this.crowi.configManager.getConfig('crowi', 'slackbot:access-token');
-  }
-
   init() {
   init() {
     this.bolt.command('/growi', async({
     this.bolt.command('/growi', async({
       command, client, body, ack,
       command, client, body, ack,
     }) => {
     }) => {
       await ack();
       await ack();
-
-      if (!this.isValidAccessToken(body, command)) {
-        logger.error('slack_bot_access_token is inValid.');
-        this.client.chat.postEphemeral({
-          channel: command.channel_id,
-          user: command.user_id,
-          blocks: [this.generateMarkdownSectionBlock('*Access token is inValid*')],
-        });
-        throw new Error('slack_bot_access_token is inValid');
-      }
-
       const args = command.text.split(' ');
       const args = command.text.split(' ');
       const firstArg = args[0];
       const firstArg = args[0];