feat(feishu): add thread reply support for topic group messages
This commit is contained in:
@@ -960,6 +960,9 @@ class FeishuChannel(BaseChannel):
|
|||||||
and not msg.metadata.get("_progress", False)
|
and not msg.metadata.get("_progress", False)
|
||||||
):
|
):
|
||||||
reply_message_id = msg.metadata.get("message_id") or None
|
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 None
|
||||||
|
|
||||||
first_send = True # tracks whether the reply has already been used
|
first_send = True # tracks whether the reply has already been used
|
||||||
|
|
||||||
@@ -1121,6 +1124,7 @@ class FeishuChannel(BaseChannel):
|
|||||||
# Extract reply context (parent/root message IDs)
|
# Extract reply context (parent/root message IDs)
|
||||||
parent_id = getattr(message, "parent_id", None) or None
|
parent_id = getattr(message, "parent_id", None) or None
|
||||||
root_id = getattr(message, "root_id", None) or None
|
root_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 message
|
# Prepend quoted message text when the user replied to another message
|
||||||
if parent_id and self._client:
|
if parent_id and self._client:
|
||||||
@@ -1149,6 +1153,7 @@ class FeishuChannel(BaseChannel):
|
|||||||
"msg_type": msg_type,
|
"msg_type": msg_type,
|
||||||
"parent_id": parent_id,
|
"parent_id": parent_id,
|
||||||
"root_id": root_id,
|
"root_id": root_id,
|
||||||
|
"thread_id": thread_id,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user