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
feat(feishu): add thread reply support for topic group messages
kohath4145f3eaccc6
diff --git a/nanobot/channels/feishu.py b/nanobot/channels/feishu.pyindex 5e3d126f6..06daf409d 100644--- a/nanobot/channels/feishu.py+++ b/nanobot/channels/feishu.py@@ -960,6 +960,9 @@ class FeishuChannel(BaseChannel):and not msg.metadata.get("_progress", False)):reply_message_id = msg.metadata.get("message_id") or None+ # For topic group messages, always reply to keep context in thread+ elif msg.metadata.get("thread_id"):+ reply_message_id = msg.metadata.get("root_id") or msg.metadata.get("message_id") or Nonefirst_send = True # tracks whether the reply has already been used@@ -1121,6 +1124,7 @@ class FeishuChannel(BaseChannel):# Extract reply context (parent/root message IDs)parent_id = getattr(message, "parent_id", None) or Noneroot_id = getattr(message, "root_id", None) or None+ thread_id = getattr(message, "thread_id", None) or None# Prepend quoted message text when the user replied to another messageif parent_id and self._client:@@ -1149,6 +1153,7 @@ class FeishuChannel(BaseChannel):"msg_type": msg_type,"parent_id": parent_id,"root_id": root_id,+ "thread_id": thread_id,})