zahmis 4 سال پیش
والد
کامیت
b3359a7b27
1فایلهای تغییر یافته به همراه4 افزوده شده و 4 حذف شده
  1. 4 4
      packages/slackbot-proxy/src/controllers/slack.ts

+ 4 - 4
packages/slackbot-proxy/src/controllers/slack.ts

@@ -214,12 +214,12 @@ export class SlackCtrl {
 
 
       const permittedCreateCommandArray = permittedChannelsForEachCommand?.channelsObject.create;
       const permittedCreateCommandArray = permittedChannelsForEachCommand?.channelsObject.create;
       const permittedSearchCommandArray = permittedChannelsForEachCommand?.channelsObject.search;
       const permittedSearchCommandArray = permittedChannelsForEachCommand?.channelsObject.search;
-      const isCreate = permittedCreateCommandArray?.includes(body.channel_name);
-      const isSearch = permittedSearchCommandArray?.includes(body.channel_name);
+      const hasCreatePermission = permittedCreateCommandArray?.includes(body.channel_name);
+      const hasSearchPermission = permittedSearchCommandArray?.includes(body.channel_name);
 
 
       switch (growiCommand.growiCommandType) {
       switch (growiCommand.growiCommandType) {
         case 'create':
         case 'create':
-          if (isCreate) {
+          if (hasCreatePermission) {
             const relationsForSingleUse:RelationMock[] = [];
             const relationsForSingleUse:RelationMock[] = [];
             body.permittedChannelsForEachCommand = relations[0].permittedChannelsForEachCommand;
             body.permittedChannelsForEachCommand = relations[0].permittedChannelsForEachCommand;
             relationsForSingleUse.push(relations[0]);
             relationsForSingleUse.push(relations[0]);
@@ -227,7 +227,7 @@ export class SlackCtrl {
           }
           }
           break;
           break;
         case 'search':
         case 'search':
-          if (isSearch) {
+          if (hasSearchPermission) {
             const relationsForBroadcastUse:RelationMock[] = [];
             const relationsForBroadcastUse:RelationMock[] = [];
             body.permittedChannelsForEachCommand = relations[0].permittedChannelsForEachCommand;
             body.permittedChannelsForEachCommand = relations[0].permittedChannelsForEachCommand;
             relationsForBroadcastUse.push(relations[0]);
             relationsForBroadcastUse.push(relations[0]);