|
@@ -79,8 +79,16 @@ 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.text == null) {
|
|
|
|
|
+ return 'No text.';
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
const parsedBody = parseSlashCommand(body);
|
|
const parsedBody = parseSlashCommand(body);
|
|
|
const executeGrowiCommand = this.growiCommandsMappings[parsedBody.growiCommandType];
|
|
const executeGrowiCommand = this.growiCommandsMappings[parsedBody.growiCommandType];
|
|
|
|
|
+
|
|
|
|
|
+ if (executeGrowiCommand == null) {
|
|
|
|
|
+ return 'No executeGrowiCommand';
|
|
|
|
|
+ }
|
|
|
await executeGrowiCommand(body);
|
|
await executeGrowiCommand(body);
|
|
|
res.send();
|
|
res.send();
|
|
|
|
|
|