-
Notifications
You must be signed in to change notification settings - Fork 638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hubot not responding to @-mentions #106
Comments
It should, you're right. Will take a look (thought I fixed this at one point). |
side effect of that, it also listens to its own messages. Ex: 'hubot help' |
scratch that. had 2 bots (old ver + new ver) on the same channel yelling at each other. |
The mental image of this made me laugh |
I haven't dug in very deeply, but it seems like this part of the hubot core should handle the @-mention case for us. Not sure what's going wrong. |
@evansolomon I dug into the debug logs and found what seems to be the issue.
...while
It looks as though @-mentions get converted into an internal Slack id, so the regex fails because it is expecting the bot name rather than the Slack id. |
As a temporary workaround, I listed the User IDs for all users via the api (just click the "go" button once you're signed in over there, gentle reader). Once I got the User ID for the hubot bot account from the API response, I updated my web: bin/hubot -a slack -n botnamegoeshere -l "<@useridgoeshere>" |
@spdustin clever, just worth noting that doing that probably creates the opposite condition where "botname hello" no longer triggers a response |
Nope, that still works, because it's an alias. So in the above example, |
What's funny is when you have slackbot responses set up for phrases that hubot says (like "ship it"). Our bot is named Christopher Walken (walken) and I keep imagining him getting all angry and up in slackbot's face. |
Oh interesting, thanks for explaining the alias. |
As a note for others coming in to this thread
†use of gender-specific pronouns not at all meant to imply that hubot has an actual gender |
I can confirm that @spdustin fix works for both @ mentions and jsut writing 'hubot' |
With the new version (v3), Hubot can now have a username - yay! But @-mentioning Hubot by its username doesn't seem to work. For instance, this fails:
...while this succeeds:
It looks like Hubot is only looking for its strict username (
hubot
) and the @ symbol is causing it to not register its name (@hubot
). But think the expectation would be that @-mentioning Hubot would be like sending a command directly to it, and@hubot image me corgi == hubot image me corgi
.The text was updated successfully, but these errors were encountered: