From 386fbeb3303649039b3a41a93c9c17a85260f9b7 Mon Sep 17 00:00:00 2001 From: VasilyKaiser <78181427+VasilyKaiser@users.noreply.github.com> Date: Sun, 22 Feb 2026 10:50:16 +0100 Subject: [PATCH] Ignore system messages in Discord handler Added check to ignore system messages in Discord bot. --- pkg/channels/discord.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkg/channels/discord.go b/pkg/channels/discord.go index 20f3b267c..83caf23a3 100644 --- a/pkg/channels/discord.go +++ b/pkg/channels/discord.go @@ -176,6 +176,15 @@ func (c *DiscordChannel) handleMessage(s *discordgo.Session, m *discordgo.Messag return } + // Ignore system messages (including thread creation messages) + // MessageTypeDefault (0) = regular user message + if m.Type != discordgo.MessageTypeDefault { + logger.DebugCF("discord", "Message ignored - system message", map[string]any{ + "message_type": int(m.Type), + }) + return + } + // Check allowlist first to avoid downloading attachments and transcribing for rejected users if !c.IsAllowed(m.Author.ID) { logger.DebugCF("discord", "Message rejected by allowlist", map[string]any{