From eabca3679ea3b52615e5b8d8e60779042fd20724 Mon Sep 17 00:00:00 2001 From: rabbitblood Date: Fri, 17 Apr 2026 19:04:31 -0700 Subject: [PATCH] fix: auto-post only to Slack, never Telegram MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BroadcastToWorkspaceChannels now filters channel_type='slack'. Telegram is CEO-only — explicit escalations via agent's outbound call, never auto-posted from cron output. PM's routine pulses and agent errors were spamming the CEO's Telegram. PM's Telegram channel stays enabled for POLLING (inbound CEO messages) but BroadcastToWorkspaceChannels skips it. Co-Authored-By: Claude Opus 4.6 (1M context) --- platform/internal/channels/manager.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platform/internal/channels/manager.go b/platform/internal/channels/manager.go index 580a67bd..9c1c320e 100644 --- a/platform/internal/channels/manager.go +++ b/platform/internal/channels/manager.go @@ -454,9 +454,11 @@ func (m *Manager) BroadcastToWorkspaceChannels(ctx context.Context, workspaceID, if len(runes) > 500 { text = string(runes[:497]) + "..." } + // Only auto-post to Slack channels. Telegram is CEO-only — explicit + // escalations via the agent's outbound call, never auto-post from crons. rows, err := db.DB.QueryContext(ctx, ` SELECT id FROM workspace_channels - WHERE workspace_id = $1 AND enabled = true + WHERE workspace_id = $1 AND enabled = true AND channel_type = 'slack' `, workspaceID) if err != nil { return