Your lightweight open-source personal agent.
Python agent-frameworkai-agentai-agentschatbotchatopsdiscord-botllm-agentsllmslocal-llmmcpmodel-context-protocolmulti-agentopenai-compatibleopenclawpersonal-ai-assistantpythonself-hostedtelegram-bot-ai-assistantwebuiworkflow-automation
fix(telegram): ignore unauthorized users silently
DG Multica5aa61e08d351
diff --git a/nanobot/channels/telegram.py b/nanobot/channels/telegram.pyindex 793419917..eecb73225 100644--- a/nanobot/channels/telegram.py+++ b/nanobot/channels/telegram.py@@ -790,6 +790,8 @@ class TelegramChannel(BaseChannel):returnuser = update.effective_user+ if not self.is_allowed(self._sender_id(user)):+ returnawait update.message.reply_text(f"👋 Hi {user.first_name}! I'm nanobot.\n\n""Send me a message and I'll respond!\n"@@ -797,8 +799,10 @@ class TelegramChannel(BaseChannel):)async def _on_help(self, update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:- """Handle /help command, bypassing ACL so all users can access it."""- if not update.message:+ """Handle /help command for allowed users only."""+ if not update.message or not update.effective_user:+ return+ if not self.is_allowed(self._sender_id(update.effective_user)):returnawait update.message.reply_text(build_help_text())@@ -1016,6 +1020,8 @@ class TelegramChannel(BaseChannel):user = update.effective_userchat_id = message.chat_idsender_id = self._sender_id(user)+ if not self.is_allowed(sender_id):+ returnself._remember_thread_context(message)# Store chat_id for replies