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 <noreply@anthropic.com>
This commit is contained in:
parent
3584c0c7be
commit
eaf4680f30
1 changed files with 1 additions and 1 deletions
|
|
@ -384,7 +384,7 @@ func (c *TelegramChannel) handleMessage(ctx context.Context, message *telego.Mes
|
||||||
"peer_id": peerID,
|
"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
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue