will
will copied to clipboard
#379 Set will_is_mentioned even if message was direct
PR makes it so will_is_mentioned
is set, even if message was determined to be direct (Began with the Chatbots handle). Change affects only HipChat and Slack, as RocketChat already seems to have this correct behaviour since it checks the mention list.
Simply moved the will_is_mentioned
to before where the name is stripped out.
Fixes #379
/cc @unicolet
let me understand the behavior a little more, if you say
Lets go ahead and deploy (at)Chatbot deploy production
in your WillPlugin, the respond_to
is set to
^Lets go ahead and deploy (at)Chatbot deploy production$
?
@wontonst The respond_to in our case was only set to the @chatbot deploy production
message, which we wanted to be able to exist anywhere in the message. The main thing I wanted was for a user to give the bot a command in the middle of their message like the above example.
I see. Let me rephrase my question. With the ability to give the bot a command in the middle of the message, what does the will respond_to look like when you match with anchors? In the example, would will respond to
^Lets go ahead and deploy (at)Chatbot deploy production$
or
^deploy production$