Răsfoiți Sursa

add body.text == null

zahmis 5 ani în urmă
părinte
comite
8d12e67bd5
1 a modificat fișierele cu 4 adăugiri și 0 ștergeri
  1. 4 0
      packages/slackbot-proxy/src/controllers/slack.ts

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

@@ -79,6 +79,10 @@ export class SlackCtrl {
     // Send response immediately to avoid opelation_timeout error
     // See https://api.slack.com/apis/connections/events-api#the-events-api__responding-to-events
 
+    if (body.text == null) {
+      return 'No text.';
+    }
+
     const parsedBody = parseSlashCommand(body);
     const executeGrowiCommand = this.growiCommandsMappings[parsedBody.growiCommandType];
     await executeGrowiCommand(body);