itizawa 5 лет назад
Родитель
Сommit
7e301d1ff2
1 измененных файлов с 1 добавлено и 15 удалено
  1. 1 15
      src/server/routes/apiv3/slack-bot.js

+ 1 - 15
src/server/routes/apiv3/slack-bot.js

@@ -8,21 +8,7 @@ module.exports = (crowi) => {
   const { boltService } = crowi;
   const { boltService } = crowi;
   const requestHandler = boltService.receiver.requestHandler.bind(boltService.receiver);
   const requestHandler = boltService.receiver.requestHandler.bind(boltService.receiver);
 
 
-  function accessTokenParserForSlackBot(req, res, next) {
-    const slackBotAccessToken = req.body.slack_bot_access_token || null;
-    if (slackBotAccessToken == null) {
-      next();
-    }
-
-    if (slackBotAccessToken === crowi.configManager.getConfig('crowi', 'slackbot:access-token')) {
-      req.body.user = {
-        username: 'slackBot',
-      };
-    }
-    next();
-  }
-
-  router.post('/', accessTokenParserForSlackBot, async(req, res) => {
+  router.post('/', async(req, res) => {
     // for verification request URL on Event Subscriptions
     // for verification request URL on Event Subscriptions
     if (req.body.type === 'url_verification') {
     if (req.body.type === 'url_verification') {
       res.send(req.body);
       res.send(req.body);