Просмотр исходного кода

separeted sharing search results method

kaori 5 лет назад
Родитель
Сommit
b9767041d6
1 измененных файлов с 7 добавлено и 2 удалено
  1. 7 2
      src/server/service/bolt.js

+ 7 - 2
src/server/service/bolt.js

@@ -121,11 +121,16 @@ class BoltService {
 
 
     this.bolt.action('button_click', async({ body, ack, say }) => {
     this.bolt.action('button_click', async({ body, ack, say }) => {
       await ack();
       await ack();
-      await say('clicked the button');
+      this.shareSeachResults(say);
     });
     });
 
 
   }
   }
 
 
+  async shareSeachResults(say) {
+    await say('clicked the button');
+  }
+
+
   notCommand(command) {
   notCommand(command) {
     logger.error('Input first arguments');
     logger.error('Input first arguments');
     return this.client.chat.postEphemeral({
     return this.client.chat.postEphemeral({
@@ -186,7 +191,7 @@ class BoltService {
                 type: 'button',
                 type: 'button',
                 text: {
                 text: {
                   type: 'plain_text',
                   type: 'plain_text',
-                  text: 'Share the results in this channel.',
+                  text: 'Share the results.',
                 },
                 },
                 style: 'primary',
                 style: 'primary',
                 action_id: 'button_click',
                 action_id: 'button_click',