fix(feishu): prevent unwanted topic creation on DM quote-reply - #30164
Open
SunmiJJW wants to merge 1 commit into
Open
fix(feishu): prevent unwanted topic creation on DM quote-reply#30164SunmiJJW wants to merge 1 commit into
SunmiJJW wants to merge 1 commit into
Conversation
Author
|
Hi! 👋 Just checking in on this PR. |
11 tasks
SunmiJJW
force-pushed
the
fix/feishu-dm-unwanted-topic
branch
from
June 4, 2026 08:16
03202a5 to
cabe3d9
Compare
13 tasks
teknium1
reviewed
Jul 13, 2026
teknium1
left a comment
Contributor
There was a problem hiding this comment.
Thanks for the focused Feishu report and narrow fix. The underlying root_id promotion is still present on current main, but the adapter moved after this PR was opened.
Problems
- The submitted edit targets
gateway/platforms/feishu.py, which was migrated toplugins/platforms/feishu/adapter.pyby5600105478ffde29d7566b45421b100eaa29c4ef. Current behavior is atplugins/platforms/feishu/adapter.py:3252, and the PR is currentlyDIRTYagainst main. - This bug fix has no regression test. The existing reply-context test at
tests/gateway/test_feishu.py:2069coversparent_id, but not a p2proot_idthat must remain reply context without becomingsource.thread_id.
Suggested changes
- Port the guard to
plugins/platforms/feishu/adapter.py:3252, leavingreply_to_message_idhandling at lines 3253-3258 intact. - Add p2p and group/channel
root_idregression cases: p2p should not setsource.thread_id; group/channel should preserve the fallback.
Automated hermes-sweeper review.
SunmiJJW
force-pushed
the
fix/feishu-dm-unwanted-topic
branch
from
July 13, 2026 12:25
cabe3d9 to
1db61dc
Compare
This was referenced Aug 3, 2026
6 tasks
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.
When a user quotes a message in a Feishu DM (
p2pchat), the SDK setsroot_idon the inbound message object. Promoting that value tosource.thread_idmakes outbound replies usereply_in_thread=True, which creates an unwanted Feishu topic on the quoted DM message.This keeps
root_idas quoted-message reply context in DMs while preserving theroot_id -> thread_idfallback for group/channel chats.What does this PR do?
reply_to_message_idandreply_to_text.Type of Change
Changes Made
plugins/platforms/feishu/adapter.py: skip theroot_id -> thread_idfallback forp2pchats.tests/gateway/test_feishu.py: add p2p and grouproot_idregression coverage.How to Test
scripts/run_tests.sh -j 1 tests/gateway/test_feishu.py -k "p2p_root_id_keeps_reply_context_without_thread or group_root_id_is_preserved_as_thread" -q python -m py_compile plugins/platforms/feishu/adapter.py tests/gateway/test_feishu.py ruff check plugins/platforms/feishu/adapter.py tests/gateway/test_feishu.pyLocal results on Windows 11 / Python 3.12:
2 passed, 210 deselected7 passed, 205 deselectedpy_compile: passedruff check: passedChecklist
Code
Documentation & Housekeeping