The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(gateway): keep no-patterns early return in mention compilation
teknium1703fe9417451
diff --git a/plugins/platforms/dingtalk/adapter.py b/plugins/platforms/dingtalk/adapter.pyindex ccfdd0b7393..a564c08e690 100644--- a/plugins/platforms/dingtalk/adapter.py+++ b/plugins/platforms/dingtalk/adapter.py@@ -458,6 +458,12 @@ class DingTalkAdapter(BasePlatformAdapter):loaded = [part.strip() for part in raw.split(",") if part.strip()]patterns = loaded+ if patterns is None:+ # Parity with the historical inline implementation: return before+ # evaluating ``self.name`` (avoids touching adapter attributes on+ # the no-patterns path).+ return []+return compile_mention_patterns(patterns,log_prefix=self.name,diff --git a/plugins/platforms/telegram/adapter.py b/plugins/platforms/telegram/adapter.pyindex 686519c45da..2b10a6ec4c6 100644--- a/plugins/platforms/telegram/adapter.py+++ b/plugins/platforms/telegram/adapter.py@@ -7818,6 +7818,12 @@ class TelegramAdapter(BasePlatformAdapter):loaded = [part.strip() for part in raw.split(",") if part.strip()]patterns = loaded+ if patterns is None:+ # Parity with the historical inline implementation: return before+ # evaluating ``self.name`` (tests construct bare adapters via+ # object.__new__ that lack the attributes ``name`` reads).+ return []+return compile_mention_patterns(patterns,log_prefix=self.name,