From e550c0200159e3153b270893f8297f9b1327ecbd Mon Sep 17 00:00:00 2001 From: Clinton Halpin Date: Thu, 13 Apr 2017 11:54:01 -0400 Subject: [PATCH] Fixes for #768 --- lib/Slackbot_worker.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/Slackbot_worker.js b/lib/Slackbot_worker.js index 65d80244d..f98a8fe77 100755 --- a/lib/Slackbot_worker.js +++ b/lib/Slackbot_worker.js @@ -738,6 +738,16 @@ module.exports = function(botkit, config) { var direct_mention = new RegExp('^\<\@' + bot.identity.id + '\>', 'i'); + if( message.actions ) { + + try { + message.text = message.actions[0].selected_options[0].value; + } catch(e) { + botkit.debug('ERROR GETTING VALUE FROM SELECT'); + } + + } + message.text = message.text.replace(direct_mention, '') .replace(/^\s+/, '').replace(/^\:\s+/, '').replace(/^\s+/, '');