From a99606f766e7d8c85067d311b606e6456a371b4b Mon Sep 17 00:00:00 2001 From: Matt Davis Date: Tue, 12 Nov 2024 14:30:09 -0500 Subject: [PATCH] fix: Assistant Prompts and Status, send channel_id with request (#1344) This is a fix for [PR 1331](https://github.com/slack-go/slack/pull/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`. --- assistant.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/assistant.go b/assistant.go index ef1425ff..8432f89b 100644 --- a/assistant.go +++ b/assistant.go @@ -60,6 +60,8 @@ func (api *Client) SetAssistantThreadsSuggestedPromptsContext(ctx context.Contex values.Add("thread_ts", params.ThreadTS) } + values.Add("channel_id", params.ChannelID) + // Send Prompts as JSON prompts, err := json.Marshal(params.Prompts) if err != nil { @@ -98,6 +100,8 @@ func (api *Client) SetAssistantThreadsStatusContext(ctx context.Context, params values.Add("thread_ts", params.ThreadTS) } + values.Add("channel_id", params.ChannelID) + // Always send the status parameter, if empty, it will clear any existing status values.Add("status", params.Status)