Skip to content
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

Add support for editing messages in slack. #37

Closed
1 of 5 tasks
crimsonknave opened this issue Jun 5, 2017 · 3 comments
Closed
1 of 5 tasks

Add support for editing messages in slack. #37

crimsonknave opened this issue Jun 5, 2017 · 3 comments

Comments

@crimsonknave
Copy link

In order to let us help you better, please fill out the following fields as best you can:

I am...

  • Reporting a bug
  • Suggesting a new feature
  • Requesting help with running my bot
  • Requesting help writing plugins
  • Here about something else

I am running...

  • Errbot version: 5.0.1
  • OS version: Linux
  • Python version: 3
  • Using a virtual environment: yes/no

Issue description

I have a chatbot that has some long running commands. I would like to be able to implement a placeholder message that then gets edited when the command finishes executing. Slack appears to support editing a message via the api (https://api.slack.com/methods/chat.update). The errbot slack backend doesn't seem to support this yet. Additionally, the commands that send a message don't seem to return the information I'd need to call the update endpoint on my own.

Basically, I'm looking to get support for the update method. But, it would be pretty cool if there was native support for a promise like call where I can supply the starting text and a function which will take a while to run and then return the final text.

Steps to reproduce

In case of a bug, please describe the steps we need to take in order to reproduce your issue.
If you cannot easily reproduce the issue please let us know and provide as much information as you can which might help us pinpoint the problem.

Additional info

If you have any more information, please specify it here.

@gbin
Copy link
Member

gbin commented Jul 3, 2017

This one will be a tough one to implement cleanly, any idea of a generic api for this ? Maybe a query to get back a specific message then change it ?

@crimsonknave
Copy link
Author

So, digging in a little closer, it looks like the send_message call in the slack backend appends the timestamp to the message. That's the only extra piece of info that the update call requires. So, in theory the message class could have an abstract method 'update' which the slack backend (and any others that support updating) implements.

@sijis
Copy link
Collaborator

sijis commented Jun 18, 2019

This seems related or possible fix: errbotio/errbot#1269

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants