-
Notifications
You must be signed in to change notification settings - Fork 39
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
DirectMentions are never detected #3
Comments
+1 |
This doesn't work for me |
@CelinaWard Did you try merging the pull request into your repo? There's also a fork mentioned in the comments of it that should include this fix and a few others. |
I didn’t, I just added the line directly in bot.go. When I type `git log` I don’t see your specific commit.
… On May 24, 2017, at 8:08 PM, Emma Simon ***@***.***> wrote:
@CelinaWard <https://github.com/celinaward> Did you try merging the pull request into your repo? There's also a fork mentioned in the comments of it that should include this fix and a few others.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#3 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/Aa9KHn-iupxGK8PYt1ThGt0Owqff4JNsks5r9MaWgaJpZM4Imgea>.
|
@CelinaWard Double check that it's the same as this: https://github.com/BeepBoopHQ/go-slackbot/pull/4/files |
Hi Emma,
Thanks for the info! I forgot that my project was using vendoring so I had to update my gvt.
Celina
… On May 25, 2017, at 1:42 PM, Emma Simon ***@***.***> wrote:
@CelinaWard <https://github.com/celinaward> Double check that it's the same as this: https://github.com/BeepBoopHQ/go-slackbot/pull/4/files <https://github.com/BeepBoopHQ/go-slackbot/pull/4/files>
Alternately just clone https://github.com/adampointer/go-slackbot <https://github.com/adampointer/go-slackbot> instead of this repo.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#3 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/Aa9KHvvXqHPOyzQDewhuin0FE9J-dE2eks5r9b2agaJpZM4Imgea>.
|
…f_nlopes Added required imports
When using the starter-go-bot, it creates a subrouter with
bot.Messages(slackbot.DirectMessage, slackbot.DirectMention).Subrouter()
. Direct messages work fine, but direct mentions do not. At the point whenHear
is called on this router, the botID of the bot is not set, and so neither is the botID of the route or the router. However, when the bot is run, the botID of the routers still never gets set. So whenUtils.IsDirectMention
is called, it's always checking for the regex^<@>.*
.This can be fixed if you add the line
b.SimpleRouter.SetBotID(ID)
toBot.setBotID
, then when the bot is run and initialized, it sets the ID for all the existing routers and routes.The text was updated successfully, but these errors were encountered: