-
Notifications
You must be signed in to change notification settings - Fork 638
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
Delete or undo last N messages #144
Comments
I think this will need support from the websocket API to edit messages. Could be wrong, but can't find anything on it in the docs https://api.slack.com/rtm. @paulhammond? |
I saw this https://api.slack.com/methods/chat.delete, but I wasn't sure how that related to the RTM api. |
Sorry for the delay in replying! The API token used to connect to the RTM API also has the ability to call web API methods - and the node-slack-client code used by hubot will have the ability to update and delete messages in the next version (see slackapi/node-slack-sdk#14 and slackapi/node-slack-sdk#17). So, once that's out you'll just need to call the right methods on the message object! |
I wrote a Hubot plugin for misc Slack utilities of which the first is a command for deleting the last N Hubot posts. I wanted to use the Slack Node Client as @paulhammond referenced above, but unfortunately there are some issues with their SDK in which it doesn't return a list of a channel's conversation history. Because of this issue (there are pull requests addressing it) I chose to interface directly with Slack's REST API for my module. See more here: https://github.com/Cox-Automotive/hubot-slack-utils |
I'm going to close this as resolved for the time being. |
It would be nice to be able to delete or undo the last message or last N messages that hubot sends.
I know this can be done manually via an admin, but would prefer a programmatic solution.
I'd be willing to accept deletion of just a single message id alternatively.
The text was updated successfully, but these errors were encountered: