Skip to content

Fix Telegram channel permission check#51

Merged
yinwm merged 1 commit intosipeed:mainfrom
victorhdchagas:fix/telegram-permission-check
Feb 12, 2026
Merged

Fix Telegram channel permission check#51
yinwm merged 1 commit intosipeed:mainfrom
victorhdchagas:fix/telegram-permission-check

Conversation

@victorhdchagas
Copy link
Contributor

Summary

Fixed a critical bug where Telegram messages were never processed by the agent loop.

Bug

The Telegram channel was creating sender IDs with username suffix (e.g., 7567444967|username) but allow_from configuration contained only numeric IDs (e.g., 7567444967). The IsAllowed() check failed, preventing messages from being published to the inbound message bus. This caused the bot to show "Thinking..." but never respond.

Solution

Modified TelegramChannel.handleMessage() to pass only the numeric user ID to HandleMessage() for permission checking, matching the format expected by allow_from configuration.

Changed Files

  • pkg/channels/telegram.go: Line 346 - Use numeric ID for permission check

Testing

Verified that Telegram messages are now processed correctly and the agent responds as expected.

@yinwm
Copy link
Collaborator

yinwm commented Feb 12, 2026

thanks for the pr

@yinwm yinwm merged commit 8968d58 into sipeed:main Feb 12, 2026
@Zepan
Copy link
Contributor

Zepan commented Feb 13, 2026

Thanks for your contribution! We are forming the PicoClaw Dev Group to accelerate the evolution of the project. Any developer with more than one merged PR is invited to join.

Would you like to join the PicoClaw Dev Group? If so, please send an email to support@sipeed.com with the subject line: [Join PicoClaw Dev Group] + Your GitHub account. We will send the Discord invite link to your inbox.

emadomedher pushed a commit to emadomedher/picoclaw that referenced this pull request Feb 17, 2026
…ion-check

Fix Telegram channel permission check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants