hubot-stackstorm icon indicating copy to clipboard operation
hubot-stackstorm copied to clipboard

Support responding in thread (Slack)

Open shreyas-shinde opened this issue 6 years ago • 4 comments

Hi, I want to confirm if there is plan to support sending response from stackstorm to the command originating thread. Acknowledgement message from Hubot is sent in the same thread but response from chatops.post_message action is sent to channel instead of thread.

shreyas-shinde avatar Feb 20 '19 12:02 shreyas-shinde

Proposal Solution:

  1. Set thread id here https://github.com/StackStorm/hubot-stackstorm/blob/master/lib/utils.js#L113
  2. Send it to stackstorm by including here https://github.com/StackStorm/hubot-stackstorm/blob/master/scripts/stackstorm.js#L294
  3. Update chatops.post_message to support thread_id param similar to channel https://github.com/StackStorm/st2/blob/master/contrib/chatops/actions/post_message.yaml#L24
  4. Update slack postdatahandler to send to correct thread https://github.com/StackStorm/hubot-stackstorm/blob/master/lib/post_data.js#L28

shreyas-shinde avatar Feb 20 '19 12:02 shreyas-shinde

I don't think anyone else has any plans to work on that, so go ahead and create a PR. The main thing to be aware of is not breaking non-Slack chat adapters.

LindsayHill avatar Feb 20 '19 13:02 LindsayHill

Yes, I would be interested in a PR for this.

blag avatar Feb 20 '19 18:02 blag

@shreyas-shinde since this is a Slack specific feature, is it possible to use the extra.slack parameter to pass the thread_id? This would avoid adding a non-generic parameter to chatops.post_message action.

nzlosh avatar Feb 21 '19 13:02 nzlosh