From 58468386759e66f4a221544f646096807c5f50c2 Mon Sep 17 00:00:00 2001 From: Eden Zimbelman Date: Fri, 21 Aug 2026 15:12:08 -0700 Subject: [PATCH] feat: add session_status to chat.stopStream Adds the optional session_status argument to chat.stopStream, which sets the agent session's lifecycle status after stopping the stream (defaults to active). Serialized in RequestFormBuilder. Co-Authored-By: Claude --- .../main/java/com/slack/api/methods/RequestFormBuilder.java | 1 + .../api/methods/request/chat/ChatStopStreamRequest.java | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/slack-api-client/src/main/java/com/slack/api/methods/RequestFormBuilder.java b/slack-api-client/src/main/java/com/slack/api/methods/RequestFormBuilder.java index c8a87c461..797341bdc 100644 --- a/slack-api-client/src/main/java/com/slack/api/methods/RequestFormBuilder.java +++ b/slack-api-client/src/main/java/com/slack/api/methods/RequestFormBuilder.java @@ -1741,6 +1741,7 @@ public static FormBody.Builder toForm(ChatStopStreamRequest req) { if (req.getBlocksAsString() != null && req.getBlocks() != null) { log.warn("Although you set both blocksAsString and blocks, only blocksAsString was used."); } + setIfNotNull("session_status", req.getSessionStatus(), form); return form; } diff --git a/slack-api-client/src/main/java/com/slack/api/methods/request/chat/ChatStopStreamRequest.java b/slack-api-client/src/main/java/com/slack/api/methods/request/chat/ChatStopStreamRequest.java index ebd6fb235..7b75e71fd 100644 --- a/slack-api-client/src/main/java/com/slack/api/methods/request/chat/ChatStopStreamRequest.java +++ b/slack-api-client/src/main/java/com/slack/api/methods/request/chat/ChatStopStreamRequest.java @@ -56,4 +56,9 @@ public class ChatStopStreamRequest implements SlackApiRequest { * A JSON-based array of structured blocks as a String that will be rendered at the bottom of the finalized message, presented as a URL-encoded string. */ private String blocksAsString; + + /** + * The session status to set after stopping the stream. Defaults to `active`. + */ + private String sessionStatus; }