From 60330e011b97af1ba79616a4b652fb969028566c Mon Sep 17 00:00:00 2001 From: haosenwang1018 <1293965075@qq.com> Date: Mon, 2 Mar 2026 04:33:30 +0800 Subject: [PATCH] fix(discord): log ignored messages from non-allowlisted channels Closes #30676 Co-Authored-By: Claude Opus 4.6 --- src/discord/monitor/message-handler.preflight.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/discord/monitor/message-handler.preflight.ts b/src/discord/monitor/message-handler.preflight.ts index 1db20111a5c..ba4aa688e02 100644 --- a/src/discord/monitor/message-handler.preflight.ts +++ b/src/discord/monitor/message-handler.preflight.ts @@ -440,12 +440,17 @@ export async function preflightDiscordMessage( }) ) { if (params.groupPolicy === "disabled") { + logDebug(`[discord-preflight] drop: groupPolicy disabled`); logVerbose(`discord: drop guild message (groupPolicy: disabled, ${channelMatchMeta})`); } else if (!channelAllowlistConfigured) { + logDebug(`[discord-preflight] drop: groupPolicy allowlist, no channel allowlist configured`); logVerbose( `discord: drop guild message (groupPolicy: allowlist, no channel allowlist, ${channelMatchMeta})`, ); } else { + logDebug( + `[discord] Ignored message from channel ${messageChannelId} (not in guild allowlist). Add to guilds..channels to enable.`, + ); logVerbose( `Blocked discord channel ${messageChannelId} not in guild channel allowlist (groupPolicy: allowlist, ${channelMatchMeta})`, );