Skip to content

slack: add config to disable thread reply broadcasting#4464

Open
AdityaHebballe wants to merge 1 commit intotarget:masterfrom
AdityaHebballe:master
Open

slack: add config to disable thread reply broadcasting#4464
AdityaHebballe wants to merge 1 commit intotarget:masterfrom
AdityaHebballe:master

Conversation

@AdityaHebballe
Copy link

Summary

Adds a configuration option Slack.DisableBroadcastThreadReplies to control whether Slack alert status updates in threads are broadcast to the main channel.

Motivation

Currently, when an alert is updated (acknowledged/closed), GoAlert replies in the original message's thread AND broadcasts that reply to the main channel (hardcoded behavior). This can be noisy in busy channels.

This PR adds a toggle to allow admins to disable broadcasting, making thread replies appear only in the thread while keeping the main channel quieter.

Changes

  • config/config.go: Added DisableBroadcastThreadReplies boolean field to Slack config
  • notification/slack/channel.go: Conditionally include slack.MsgOptionBroadcast() based on config setting
  • graphql2/mapconfig.go: Auto-generated GraphQL mapping for new config option
  • test/smoke/slacknotification_test.go: Added smoke test for disabled broadcast behavior
  • web/src/schema.d.ts: Auto-generated TypeScript schema update

Behavior

  • Default (toggle OFF): Thread replies broadcast to both thread and main channel (preserves current behavior)
  • Enabled (toggle ON): Thread replies appear only in thread (quieter channels)

Testing

The configuration option appears in the Admin UI at:

  • Location: Admin > System Configuration > Slack
  • Label: "Disable Broadcast Thread Replies"
  • Type: Toggle switch

To test manually:

  1. Configure Slack integration
  2. Create an alert that triggers a Slack notification
  3. Update the alert (ack/close)
  4. Verify thread reply behavior matches the toggle setting

Smoke test added: TestSlackNotification_NoBroadcast

Backwards Compatibility

✅ Preserves existing behavior by default (broadcast enabled when toggle is OFF)

Adds DisableBroadcastThreadReplies configuration option to control
whether Slack alert status updates in threads are broadcast to the
main channel.

When disabled (set to true), thread replies appear only in the thread.
When enabled (default: false), thread replies broadcast to both the
thread and main channel, preserving current behavior.

Changes:
- Add DisableBroadcastThreadReplies field to Slack config
- Conditionally include slack.MsgOptionBroadcast() based on config
- Auto-generate GraphQL mapping for new config option
- Add smoke test for disabled broadcast behavior
@AdityaHebballe AdityaHebballe marked this pull request as ready for review February 2, 2026 12:06
@github-actions github-actions bot added the size/s label Feb 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants