Closed crimsonknave closed 10 months ago
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 ?
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.
This seems related or possible fix: https://github.com/errbotio/errbot/pull/1269
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
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.