howdyai / botkit-middleware-witai

Middleware for using Wit.ai with Botkit-powered bots
MIT License
87 stars 49 forks source link

wit.ai is not called when directly messaging bot #19

Open makstaks opened 7 years ago

makstaks commented 7 years ago

In botkit-middleware-witai.js, the receive function has this condition:

message.text && message.text.indexOf(bot.identity.id) > -1)

When I directly message the bot, the message.text doesn't contain the bot's identity so this always condition always fails. I want to be able to DM the bot, and have wit.ai process the message.

makstaks commented 7 years ago

@peterswimm I opened a PR to fix this bug here: https://github.com/howdyai/botkit-middleware-witai/pull/21