Browse Source

success to log view_submission

kaori 5 years ago
parent
commit
db2838b301
1 changed files with 7 additions and 0 deletions
  1. 7 0
      packages/slackbot-proxy/src/controllers/slack.ts

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

@@ -77,6 +77,13 @@ export class SlackCtrl {
     // Send response immediately to avoid opelation_timeout error
     // Send response immediately to avoid opelation_timeout error
     // See https://api.slack.com/apis/connections/events-api#the-events-api__responding-to-events
     // See https://api.slack.com/apis/connections/events-api#the-events-api__responding-to-events
 
 
+
+    if (body.payload != null) {
+      const payload = JSON.parse(body.payload);
+      const { type } = payload;
+      console.log('type', type);
+    }
+
     if (body.text == null) {
     if (body.text == null) {
       return 'No text.';
       return 'No text.';
     }
     }