-
Notifications
You must be signed in to change notification settings - Fork 614
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
Support a generic callback_mention on user mentions #550
Comments
I would say we could have a callback_mention(self, message: message, mentioned_people: Sequence[Identifier]) signature in the plugin api ? basically anytime somebody gets mentionned, the plugins get notified with the message and the list of identifiers that were mentioned ? |
Callback in base backend class or? |
I was thinking about a callback in BotPlugin, if you don't implement it, it won't do anything, if you implement it you can get the notifications and check against the identity of the bot if the bot was mentioned |
Ah, I saw there's way to get Bot identifier from BotPlugin, so these days I can implement it. |
@L3K0V Does this change in your I have the following below using a Slack backend and this tends to work for us:
Out of curiosity, i did add BOT_ALT_PREFIXES and added '@hubot' but it made no difference. |
Yes your configuration will work, but the idea was to have ability to The workaround I propose is working with @ but in Errbot config you must On Mon, 7 Dec 2015 07:00 Sijis Aviles notifications@github.com wrote:
|
Hello, yesterday I try Hubot with Slack integration and when I mention robot and write some command with
@hubot some command
Bot responses. Today I try this with Err and nothing happened. I take a look in Slack backend and some debug log from Errbot and figure that there's chance to add mention functionality:https://github.com/errbotio/errbot/blob/master/errbot/backends/slack.py#L335
Here
mention
setting must be set and must be evaluated and checked in: https://github.com/errbotio/errbot/blob/master/errbot/errBot.py#L234Can someone give me an idea how to pass it from backend to
ErrBot.py
? Some elegant way which won't break Errbot dev principles.Thanks!
PS. Some workaround is to debug errbot and get bot id in format
<@U*********>
. Then add@U*********
toBOT_ALT_PREFIXES
variableThe text was updated successfully, but these errors were encountered: