diff --git a/src/botkit-middleware-witai.js b/src/botkit-middleware-witai.js index f6e12c0..dc34f10 100644 --- a/src/botkit-middleware-witai.js +++ b/src/botkit-middleware-witai.js @@ -29,9 +29,8 @@ module.exports = function(config) { var middleware = {}; middleware.receive = function(bot, message, next) { - // Only parse messages of type text and mention the bot. - // Otherwise it would send every single message to wit (probably don't want that). - if (message.text && message.text.indexOf(bot.identity.id) > -1) { + // Only parse messages of type text + if (message.text) { client.message(message.text, function(error, data) { if (error) { next(error);