botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

Bot in an Slack channel (v 3.0.1) answers all the messages, not only the messages addressed to him

Open javi-jamaa opened this issue 10 years ago • 5 comments

If you add your bot to a Slack channel the bot answers all the messages sent to the channel, not only the messages sent them directly to him. The right behaviour would be that the bot only answers the messages sent directly to him. I'm using the 3.0.1 version of the node framework although this happened in the previous version too.

javi-jamaa avatar Jul 13 '16 07:07 javi-jamaa

Slack sends messages to all members of a channel regardless of whether they are mentioned. If you want your bot to respond only when mentioned you should look at the Entities property on the message to see if your bot is mentioned. You can also use the Conversation.IsGroup property to determine if the group contains more than two members.

craigjensen avatar Jul 13 '16 23:07 craigjensen

This happens to me with the groupme channel, whereas in V1 my bot only responded when specifically mentioned

TexAgg avatar Jul 17 '16 01:07 TexAgg

@craigjensen Entities in slack messages is empty

javi-jamaa avatar Jul 27 '16 15:07 javi-jamaa

@javi-jamaa Can you provide more details? If you send a Slack message without @mentioning anyone in the channel, the Entities will be empty. If you @mention a person/bot in the channel, the Entities should not be empty.

craigjensen avatar Jul 27 '16 15:07 craigjensen

@javi-jamaa, I'm going to close this, as this has been inactive for a while. If you still have issues, please open a new issue, or mention me in this thread asking me to re-open. thanks!

Andrea-Orimoto avatar Aug 24 '16 01:08 Andrea-Orimoto