Skip to content

Commit 93fa4c1

Browse files
MattDavisRVgautamr95
authored andcommitted
fix: Assistant Prompts and Status, send channel_id with request (slack-go#1344)
This is a fix for [PR 1331](slack-go#1331), which I mistakenly removed the channel_id parameter from the API request during feedback. Without channel_id provided, the call always returns `invalid_arguments`.
1 parent 82d3fba commit 93fa4c1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

assistant.go

+4
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ func (api *Client) SetAssistantThreadsSuggestedPromptsContext(ctx context.Contex
6060
values.Add("thread_ts", params.ThreadTS)
6161
}
6262

63+
values.Add("channel_id", params.ChannelID)
64+
6365
// Send Prompts as JSON
6466
prompts, err := json.Marshal(params.Prompts)
6567
if err != nil {
@@ -98,6 +100,8 @@ func (api *Client) SetAssistantThreadsStatusContext(ctx context.Context, params
98100
values.Add("thread_ts", params.ThreadTS)
99101
}
100102

103+
values.Add("channel_id", params.ChannelID)
104+
101105
// Always send the status parameter, if empty, it will clear any existing status
102106
values.Add("status", params.Status)
103107

0 commit comments

Comments
 (0)