zahmis 4 лет назад
Родитель
Сommit
695554ea01

+ 0 - 1
packages/slackbot-proxy/src/controllers/slack.ts

@@ -151,7 +151,6 @@ export class SlackCtrl {
 
     const payload = JSON.parse(body.payload);
     const { type } = payload;
-    console.log('payloadmatu', payload);
 
     // register
     // response_urls is an array but the element included is only one.

+ 1 - 19
packages/slackbot-proxy/src/services/RegisterService.ts

@@ -13,8 +13,7 @@ export class RegisterService implements GrowiCommandProcessor {
 
   async process(growiCommand: GrowiCommand, authorizeResult: AuthorizeResult, body: {[key:string]:string}): Promise<void> {
     const { botToken } = authorizeResult;
-    console.log(body.channel_name);
-    // tmp use process.env
+
     const client = new WebClient(botToken, { logLevel: isProduction ? LogLevel.DEBUG : LogLevel.INFO });
     await client.views.open({
       trigger_id: body.trigger_id,
@@ -37,21 +36,6 @@ export class RegisterService implements GrowiCommandProcessor {
           generateInputSectionBlock('growiDomain', 'GROWI domain', 'contents_input', false, 'https://example.com'),
           generateInputSectionBlock('growiAccessToken', 'GROWI ACCESS_TOKEN', 'contents_input', false, 'jBMZvpk.....'),
           generateInputSectionBlock('proxyToken', 'PROXY ACCESS_TOKEN', 'contents_input', false, 'jBMZvpk.....'),
-          // added an input block to make response_url enabled and get info (block_id, action_id, channel_id, response_url)
-          // refer to https://api.slack.com/surfaces/modals/using#modal_response_url
-          // {
-          //   type: 'input',
-          //   label: {
-          //     type: 'plain_text',
-          //     text: 'Select a channel to post the proxy URL on',
-          //   },
-          //   element: {
-          //     action_id: 'submit_growi_url_and_access_tokens',
-          //     type: 'conversations_select',
-          //     response_url_enabled: true,
-          //     default_to_current_conversation: true,
-          //   },
-          // },
         ],
       },
     });
@@ -86,8 +70,6 @@ export class RegisterService implements GrowiCommandProcessor {
   ): Promise<void> {
 
     const { botToken } = authorizeResult;
-    console.log((payload.view.private_metadata));
-
 
     const serverUri = process.env.SERVER_URI;