fix: auto-post only to Slack, never Telegram
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) <noreply@anthropic.com>
This commit is contained in:
parent
c65150edf6
commit
eabca3679e
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user