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: also check channel match before inheriting default message_id
WormWddc9fc4fd286
diff --git a/nanobot/agent/tools/message.py b/nanobot/agent/tools/message.pyindex efbadca10..3ac813248 100644--- a/nanobot/agent/tools/message.py+++ b/nanobot/agent/tools/message.py@@ -86,12 +86,14 @@ class MessageTool(Tool):) -> str:channel = channel or self._default_channelchat_id = chat_id or self._default_chat_id- # Only use default message_id if chat_id matches the default context.- # If targeting a different chat, don't reply to the original message.- if chat_id == self._default_chat_id:+ # Only inherit default message_id when targeting the same channel+chat.+ # Cross-chat sends must not carry the original message_id, because+ # some channels (e.g. Feishu) use it to determine the target+ # conversation via their Reply API, which would route the message+ # to the wrong chat entirely.+ if channel == self._default_channel and chat_id == self._default_chat_id:message_id = message_id or self._default_message_idelse:- # Targeting a different chat - don't use default message_idmessage_id = Noneif not channel or not chat_id: