Skip to content

feat(config): add broadcastReplies option#7

Open
philz3906 wants to merge 1 commit into
mainfrom
feat/broadcast-replies
Open

feat(config): add broadcastReplies option#7
philz3906 wants to merge 1 commit into
mainfrom
feat/broadcast-replies

Conversation

@philz3906

Copy link
Copy Markdown

What

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 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_broadcast was never set anywhere in the adapter.

How

  • types.ts — new broadcastReplies: z.boolean().default(false) on SlackChannelConfigSchema.
  • text-buffer.tsSlackTextBuffer takes an optional broadcast flag and sets reply_broadcast: true on its chat.postMessage calls only when a thread_ts is present (Slack ignores the flag on top-level posts).
  • adapter.ts — passes slackConfig.broadcastReplies when constructing the buffer.
  • README — documents the new option.

Scope / safety

  • Default false → no behaviour change for existing bots.
  • Only affects the assistant's text replies (SlackTextBuffer). Progress/tool-card/notification messages are untouched.
  • DM and non-threaded output unchanged (reply_broadcast omitted 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

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant