fix(feishu): use ReplyMessage instead of CreateMessage for thread delivery - #61398
fix(feishu): use ReplyMessage instead of CreateMessage for thread delivery#61398isheng-eqi wants to merge 3 commits into
Conversation
…ivery Feishu does not accept receive_id_type=thread_id in CreateMessage. When sending a message to a thread without a specific reply target, use ReplyMessage with reply_in_thread=True instead. The previous code also had a bug where the CreateMessage request was built but never used because the code fell through to the else block. Fixes NousResearch#61000
Fix PR for #61000. Same Feishu thread-delivery symptom ([99992402] |
…thread delivery PR changes thread delivery from message.create to message.reply. Test was still expecting message.create.
ReplyMessage request uses message_id for thread routing, not receive_id. Also checks reply_in_thread=True.
teknium1
left a comment
There was a problem hiding this comment.
Thanks for isolating the invalid CreateMessage(receive_id_type="thread_id") path; that branch is still present on current main at plugins/platforms/feishu/adapter.py:4628-4651.
Problems
- The replacement branch passes
_thread_idtoReplyMessageRequest.message_id. Main distinguishes topic IDs from reply anchors:tests/gateway/test_feishu.py:2108-2116suppliesthread_id="omt-thread"andreply_to_message_id="om_trigger", then verifiesom_triggeris the ReplyMessage target. The PR test instead asserts anomt_topic_abcvalue is a valid message ID, so it does not demonstrate the new no-anchor call is supported. - This branch is reached precisely without a reply target, including
_standalone_send()which provides onlythread_idatplugins/platforms/feishu/adapter.py:5412-5433. The PR needs an explicit valid no-anchor behavior.
Suggested changes
- Keep ReplyMessage limited to a real reply anchor; for a genuinely unanchored thread send, add a tested supported fallback (for example, chat-level delivery), or propagate a valid anchor through the relevant callers.
Automated hermes-sweeper review.
| content=payload, | ||
| msg_type=msg_type, | ||
| reply_in_thread=True, | ||
| uuid_value=str(uuid.uuid4()), |
There was a problem hiding this comment.
_thread_id is the topic-routing value in this no-anchor branch, not an established ReplyMessage anchor. Main's Feishu test uses omt-thread for thread_id but sends the reply to a distinct om_trigger ID (tests/gateway/test_feishu.py:2108-2116). Please use a verified message anchor here or implement an explicit supported no-anchor fallback.
Fixes #61000
Feishu does not accept receive_id_type=thread_id in CreateMessage — returns error 99992402. When sending a message to a thread (topic) without a specific reply target, use ReplyMessage with reply_in_thread=True instead.
The previous code also had a bug where the CreateMessage request was built but never actually sent because the code fell through to the else block and built a second request.