Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ in development
* Use Github Actions for tests.
* Remove TravisCI.

0.12.1
------

* Allow responding in a thread for the ack/result in slack (improvement) #237

0.12.0
------

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "hubot-stackstorm",
"description": "A hubot plugin for integrating with StackStorm event-driven infrastructure automation platform.",
"version": "0.12.0",
"version": "0.12.1",
"author": "StackStorm, Inc. <info@stackstorm.com>",
"license": "Apache-2.0",
"keywords": [
Expand Down
5 changes: 5 additions & 0 deletions src/lib/adapters/slack.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ SlackAdapter.prototype.postData = function(data) {
};
}

//If extra.slack.thread_response is set, we will send the response in a thread (SLACK ONLY)
if (data.extra && data.extra.slack && data.extra.slack.thread_response) {
envelope.message = {"thread_ts": data.context.message.id};
}

// Allow packs to specify arbitrary keys
if (data.extra && data.extra.slack && data.extra.slack.attachments) {
// Action:
Expand Down
6 changes: 6 additions & 0 deletions src/lib/stackstorm_api.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,12 @@ StackStorm.prototype.sendAck = function (msg, res) {
}
}

// If ack.extra.slack.thread_response is set in the action-alias definition,
// then we will thread the ACK response message (SLACK ONLY)
if (res.extra && res.extra.slack && res.extra.slack.thread_response) {
msg.message.thread_ts = msg.message.id;
}

if (res.message) {
return msg.send(res.message + history);
}
Expand Down