fix(feishu): avoid creating incorrect thread to msg referenced by user - #23758
Open
Faithful-Mind wants to merge 1 commit into
Open
fix(feishu): avoid creating incorrect thread to msg referenced by user#23758Faithful-Mind wants to merge 1 commit into
Faithful-Mind wants to merge 1 commit into
Conversation
reply to user's message instead
Collaborator
teknium1
reviewed
Jul 13, 2026
teknium1
left a comment
Contributor
There was a problem hiding this comment.
Thanks for the focused regression coverage. The underlying issue is still present on current main: plugins/platforms/feishu/adapter.py:3252 continues to use root_id as a fallback for thread_id, while lines 3253-3257 already preserve root_id separately as reply context.
Problems
- The PR changes the former adapter path,
gateway/platforms/feishu.py. Current main moved that adapter toplugins/platforms/feishu/adapter.pyin5600105478ffde29d7566b45421b100eaa29c4ef, so the production hunk needs relocation during salvage.
Suggested changes
- Apply the one-line change at
plugins/platforms/feishu/adapter.py:3252and port the proposed tests totests/gateway/test_feishu.py. - Keep the existing
reply_to_message_idfallback throughroot_idatplugins/platforms/feishu/adapter.py:3253-3257; it is separate from session/thread routing.
Automated hermes-sweeper review.
| @@ -2930,7 +2930,7 @@ async def _process_inbound_message( | |||
| if hint: | |||
Contributor
There was a problem hiding this comment.
Current main moved this adapter to plugins/platforms/feishu/adapter.py:3252 in 5600105478ffde29d7566b45421b100eaa29c4ef. Preserve this exact one-line behavior change when salvaging it into the relocated adapter.
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
avoid creating incorrect thread to referenced msg refered by user
reply to user's message instead
避免错误创建话题在用户所引用的消息上
改为直接回复用户的消息
Related Issue
Fixes #20548
Type of Change
Changes Made
gateway/platforms/feishu.pyremoved incorrect
or getattr(message, "root_id", None)fallback condition from thethread_idassignment in_process_inbound_message, soroot_idno longer leaks intothread_idtests/gateway/test_feishu.py— Added two tests toTestFeishuProcessInboundMessage:test_root_id_not_used_as_thread_id— verifiesthread_idisNonewhen onlyroot_idis settest_thread_id_passed_when_set— verifiesthread_idis passed through correctly when explicitly setHow to Test
在飞书私聊发送一条回复所引用消息的消息,不要在话题中回复或者创建话题。
检查Hermes对刚才发的消息的回复。
Hermes的回复应该出现在主对话聊天记录中,而非出现在单独的新话题中。
Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AScreenshots / Logs