itizawa 4 лет назад
Родитель
Сommit
05be6c4d19

+ 2 - 2
packages/slack/src/index.ts

@@ -8,11 +8,11 @@ export const supportedGrowiCommands: string[] = [
   'help',
 ];
 
-export const supportedCommandsNameForBroadcastUse: string[] = [
+export const defaultSupportedCommandsNameForBroadcastUse: string[] = [
   'search',
 ];
 
-export const supportedCommandsNameForSingleUse: string[] = [
+export const defaultSupportedCommandsNameForSingleUse: string[] = [
   'create',
 ];
 

+ 3 - 3
src/client/js/components/Admin/SlackIntegration/WithProxyAccordions.jsx

@@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
 import { useTranslation } from 'react-i18next';
 import { CopyToClipboard } from 'react-copy-to-clipboard';
 import loggerFactory from '@alias/logger';
-import { supportedCommandsNameForBroadcastUse, supportedCommandsNameForSingleUse } from '@growi/slack';
+import { defaultSupportedCommandsNameForBroadcastUse, defaultSupportedCommandsNameForSingleUse } from '@growi/slack';
 
 import { withUnstatedContainers } from '../../UnstatedUtils';
 import { toastSuccess, toastError } from '../../../util/apiNotification';
@@ -265,7 +265,7 @@ const ManageCommandsProcess = ({
       <span className="mb-2">Broadcast Use</span>
       <div className="custom-control custom-checkbox">
         <div className="row mb-5">
-          {supportedCommandsNameForBroadcastUse.map((commandName) => {
+          {defaultSupportedCommandsNameForBroadcastUse.map((commandName) => {
             return (
               <div className="col-sm-6 my-1" key={commandName}>
                 <input
@@ -288,7 +288,7 @@ const ManageCommandsProcess = ({
       <span className="mb-2">Single Use</span>
       <div className="custom-control custom-checkbox">
         <div className="row mb-5">
-          {supportedCommandsNameForSingleUse.map((commandName) => {
+          {defaultSupportedCommandsNameForSingleUse.map((commandName) => {
             return (
               <div className="col-sm-6 my-1" key={commandName}>
                 <input

+ 3 - 3
src/server/routes/apiv3/slack-integration-settings.js

@@ -6,7 +6,7 @@ const urljoin = require('url-join');
 const loggerFactory = require('@alias/logger');
 
 const {
-  getConnectionStatus, getConnectionStatuses, sendSuccessMessage, supportedCommandsNameForBroadcastUse, supportedCommandsNameForSingleUse,
+  getConnectionStatus, getConnectionStatuses, sendSuccessMessage, defaultSupportedCommandsNameForBroadcastUse, defaultSupportedCommandsNameForSingleUse,
 } = require('@growi/slack');
 
 const ErrorV3 = require('../../models/vo/error-apiv3');
@@ -411,8 +411,8 @@ module.exports = (crowi) => {
       const slackAppTokens = await SlackAppIntegration.create({
         tokenGtoP,
         tokenPtoG,
-        supportedCommandsForBroadcastUse: supportedCommandsNameForBroadcastUse,
-        supportedCommandsForSingleUse: supportedCommandsNameForSingleUse,
+        supportedCommandsForBroadcastUse: defaultSupportedCommandsNameForBroadcastUse,
+        supportedCommandsForSingleUse: defaultSupportedCommandsNameForSingleUse,
       });
       return res.apiv3(slackAppTokens, 200);
     }