feat(config): add broadcastReplies option#7
Open
philz3906 wants to merge 1 commit into
Open
Conversation
Adds an opt-in `broadcastReplies` config flag (default false). When enabled, the bot's reply text in subscribed-channel threads is posted with Slack's `reply_broadcast: true`, so the reply also appears in the channel's main timeline — useful for highlighting important answers without making members open the thread. Only affects threaded replies (SlackTextBuffer output). DM and non-threaded posts are unchanged; `reply_broadcast` is omitted when there is no `thread_ts` since Slack ignores it on top-level messages. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds an opt-in
broadcastRepliesconfig flag (defaultfalse). When enabled, the bot's reply text in subscribed-channel threads is posted with Slack'sreply_broadcast: true, so the reply also appears in the channel's main timeline — useful for highlighting important answers without making channel members open the thread.Why
Requested behaviour: in a group channel, surface a bot reply in the channel itself (not buried in a thread) to emphasize importance. There was previously no way to do this — all output was strictly threaded off the trigger message, and
reply_broadcastwas never set anywhere in the adapter.How
types.ts— newbroadcastReplies: z.boolean().default(false)onSlackChannelConfigSchema.text-buffer.ts—SlackTextBuffertakes an optionalbroadcastflag and setsreply_broadcast: trueon itschat.postMessagecalls only when athread_tsis present (Slack ignores the flag on top-level posts).adapter.ts— passesslackConfig.broadcastReplieswhen constructing the buffer.Scope / safety
false→ no behaviour change for existing bots.SlackTextBuffer). Progress/tool-card/notification messages are untouched.reply_broadcastomitted without a thread).Tests
Added unit tests for the schema default/override and the broadcast behaviour. Full suite: 179 passed, 1 skipped.
🤖 Generated with Claude Code