Browse Source

separeted sharing search results method

kaori 5 years ago
parent
commit
b9767041d6
1 changed files with 7 additions and 2 deletions
  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 }) => {
       await ack();
-      await say('clicked the button');
+      this.shareSeachResults(say);
     });
 
   }
 
+  async shareSeachResults(say) {
+    await say('clicked the button');
+  }
+
+
   notCommand(command) {
     logger.error('Input first arguments');
     return this.client.chat.postEphemeral({
@@ -186,7 +191,7 @@ class BoltService {
                 type: 'button',
                 text: {
                   type: 'plain_text',
-                  text: 'Share the results in this channel.',
+                  text: 'Share the results.',
                 },
                 style: 'primary',
                 action_id: 'button_click',