Skip to content

Commit

Permalink
Support publishing a messge to a specific thread (#1309)
Browse files Browse the repository at this point in the history
Support publishing a messge to a specific thread
https://api.slack.com/interactivity/handling#publishing_in_thread

From slack interactivity documentation:
Publishing responses in thread 
If you want to publish a message to a specific thread, you'll need to
include an attribute response_type and set its value to in_channel.
Then, to specify the thread, include a thread_ts.

Also, be sure to set replace_original to false or you'll overwrite the
message you're wanting to respond to!
  • Loading branch information
Nikolo authored Sep 17, 2024
1 parent 5386d65 commit 6c4585b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions chat.go
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ func (t responseURLSender) BuildRequestContext(ctx context.Context) (*http.Reque
req, err := jsonReq(ctx, t.endpoint, Msg{
Text: t.values.Get("text"),
Timestamp: t.values.Get("ts"),
ThreadTimestamp: t.values.Get("thread_ts"),
Attachments: t.attachments,
Blocks: t.blocks,
Metadata: t.metadata,
Expand Down

0 comments on commit 6c4585b

Please sign in to comment.