slack: add config to disable thread reply broadcasting#4464
Open
AdityaHebballe wants to merge 1 commit intotarget:masterfrom
Open
slack: add config to disable thread reply broadcasting#4464AdityaHebballe wants to merge 1 commit intotarget:masterfrom
AdityaHebballe wants to merge 1 commit intotarget:masterfrom
Conversation
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
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.
Summary
Adds a configuration option
Slack.DisableBroadcastThreadRepliesto 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
DisableBroadcastThreadRepliesboolean field to Slack configslack.MsgOptionBroadcast()based on config settingBehavior
Testing
The configuration option appears in the Admin UI at:
To test manually:
Smoke test added:
TestSlackNotification_NoBroadcastBackwards Compatibility
✅ Preserves existing behavior by default (broadcast enabled when toggle is OFF)