Skip to content

Commit 41d9f5e

Browse files
committed
Adding loadingMessages parameter to AssistantThreadsApi.SetStatus
Resolves #252
1 parent 240c60c commit 41d9f5e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

SlackNet/WebApi/AssistantThreadsApi.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ public interface IAssistantThreadsApi
1515
/// <param name="channelId">Channel ID containing the assistant thread.</param>
1616
/// <param name="threadTs">Message timestamp of the thread of where to set the status.</param>
1717
/// <param name="status">Status of the specified bot user, e.g. "is thinking..."</param>
18+
/// <param name="loadingMessages">The list of messages to rotate through as a loading indicator.</param>
1819
/// <param name="cancellationToken"></param>
19-
Task SetStatus(string channelId, string threadTs, string status, CancellationToken cancellationToken = default);
20+
Task SetStatus(string channelId, string threadTs, string status, [CanBeNull] IEnumerable<string> loadingMessages = null, CancellationToken cancellationToken = default);
2021

2122
/// <summary>
2223
/// Set suggested prompts for the given assistant thread.
@@ -42,12 +43,13 @@ public interface IAssistantThreadsApi
4243

4344
public class AssistantThreadsApi(ISlackApiClient client) : IAssistantThreadsApi
4445
{
45-
public Task SetStatus(string channelId, string threadTs, string status, CancellationToken cancellationToken = default) =>
46+
public Task SetStatus(string channelId, string threadTs, string status, IEnumerable<string> loadingMessages = null, CancellationToken cancellationToken = default) =>
4647
client.Post("assistant.threads.setStatus", new Args
4748
{
4849
{ "channel_id", channelId },
4950
{ "thread_ts", threadTs },
50-
{ "status", status }
51+
{ "status", status },
52+
{ "loading_messages", loadingMessages }
5153
}, cancellationToken);
5254

5355
public Task SetSuggestedPrompts(string channelId, string threadTs, IEnumerable<AssistantPrompt> prompts, string title = null, CancellationToken cancellationToken = default) =>

0 commit comments

Comments
 (0)