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
simplify(pairing): unify allow_list lookup in BaseChannel.is_allowed()
chengyongrucab4bdbf33e0
diff --git a/nanobot/channels/base.py b/nanobot/channels/base.pyindex ee523da5a..aac3147e8 100644--- a/nanobot/channels/base.py+++ b/nanobot/channels/base.py@@ -184,12 +184,9 @@ class BaseChannel(ABC):def is_allowed(self, sender_id: str) -> bool:"""Check sender permission: star > allowlist > pairing store > deny."""if isinstance(self.config, dict):- if "allow_from" in self.config:- allow_list = self.config.get("allow_from") or []- else:- allow_list = self.config.get("allowFrom", []) or []+ allow_list = self.config.get("allow_from") or self.config.get("allowFrom") or []else:- allow_list = getattr(self.config, "allow_from", []) or []+ allow_list = getattr(self.config, "allow_from", None) or []if "*" in allow_list:return True# allowFrom entries are opaque tokens — must match exactly.