-
Notifications
You must be signed in to change notification settings - Fork 28
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
Slack: A message property returning if it's an edit #36
Comments
https://github.com/errbotio/errbot/issues/1032 is related to this |
They are different. This is asking for a property to be added to the |
Yup, but they're a bit related imho. If a plugin can update/edit a message, it would be good to be able to check if a new message coming in is edited. |
Possibly related: errbotio/errbot#1269 |
Access to the underlying slack event is possible with the err-backend-slackv3/slackv3.py Line 489 in 4d48c5b
Below is an extract from a slack event that contains a message edit:
Plugins that need to make a decision on how to handle message edits, have access to this event via msg.extras property and can decide how to process the changed text. This feature should be documented to be clearly understood by future plugin developers. |
In order to let us help you better, please fill out the following fields as best you can:
I am...
I am running...
Issue description
After errbotio/errbot#382, when messages are edited in Slack, Errbot plugins receive them again. If the bot responds to a message (eg. "ticket errbotio/errbot#1234" -> {details of ticket}) then the channel keeps getting additional replies over & over.
Would be nice to be able to detect a message as an edit so the botcmd can skip it. eg.
if msg.is_edit: return
This doesn't solve all use cases (eg. "ticket errbotio/errbot#1234" edited to "ticket errbotio/errbot#1235" when the bot should respond with different content) but does help the common case, and could be built on to support that sort of thing.
The text was updated successfully, but these errors were encountered: