From eaf4680f30df17bb0a1e6783d7631e842077a13d Mon Sep 17 00:00:00 2001 From: omrikiei Date: Thu, 26 Feb 2026 20:00:11 -0600 Subject: [PATCH] fix(telegram): pass senderID with username to HandleMessage Fixes a regression introduced in commit 9d5728e where HandleMessage was called with only the numeric user ID instead of the full senderID that includes the username (format: "userID|username"). This caused the allowlist check in base.go to fail when using username-based filtering in the allow_from configuration, resulting in all messages being silently rejected even from authorized users. The fix ensures the correctly formatted senderID variable is passed to HandleMessage, restoring support for username-based allowlist filtering. Co-Authored-By: Claude Sonnet 4.5 --- pkg/channels/telegram.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/channels/telegram.go b/pkg/channels/telegram.go index 6592d9bc0..90844d1f4 100644 --- a/pkg/channels/telegram.go +++ b/pkg/channels/telegram.go @@ -384,7 +384,7 @@ func (c *TelegramChannel) handleMessage(ctx context.Context, message *telego.Mes "peer_id": peerID, } - c.HandleMessage(fmt.Sprintf("%d", user.ID), fmt.Sprintf("%d", chatID), content, mediaPaths, metadata) + c.HandleMessage(senderID, fmt.Sprintf("%d", chatID), content, mediaPaths, metadata) return nil }