fix(feishu): reply inside P2P thread instead of as standalone message#38996
fix(feishu): reply inside P2P thread instead of as standalone message#38996alvinttang wants to merge 1 commit intoopenclaw:mainfrom
Conversation
Greptile SummaryThis PR fixes a regression (#33789) where Feishu bot replies to messages inside P2P (direct message) threads were sent as standalone messages instead of staying inside the thread. It also includes a fix (#38757) that prevents resolved plaintext API key secrets from being persisted to Feishu P2P thread fix (
API key plaintext prevention (
No automated tests were added for the P2P thread fix in Confidence Score: 5/5
Last reviewed commit: 39b4532 |
When a user sends a message inside a thread in a P2P (direct message) chat, the bot now correctly replies within that thread. Previously, all thread-aware reply logic was gated behind isGroup checks, causing P2P thread replies to be sent as standalone messages. The fix detects P2P threads via the thread_id field (per Feishu API docs, thread_id indicates a thread message vs root_id which indicates a quote reply) and enables thread-aware replies for direct messages. Fixes openclaw#38806 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
39b4532 to
a2cc88b
Compare
|
This pull request has been automatically marked as stale due to inactivity. |
|
Closing this as duplicate or superseded after Codex automated review. Close #38996 as duplicate/superseded. Current main still lacks the Feishu P2P thread reply fix, but open PR #38808 tracks the same #38806 regression and contains the same direct-thread routing change plus targeted P2P regression tests. PR #38814 was already closed in favor of #38808, making #38808 the established canonical item for this fix family. Best possible solution: Close #38996 as superseded by open PR #38808. Continue review or landing work on #38808, preserving its P2P thread and P2P plain-reply regression tests, and keep #38806 open until the fix reaches main. What I checked:
So I’m closing this here and keeping the remaining discussion on the canonical linked item. Codex Review notes: model gpt-5.5, reasoning high; reviewed against 46b9044c3f9d. |
Summary
isGroupchecksthread_idfield (per Feishu API docs,thread_idindicates a thread message)Changes in
extensions/feishu/src/bot.tsisDmThreaddetection:isDirect && Boolean(ctx.threadId)replyInThreadnow returnstruefor P2P threads (was hardcodedfalse)replyTargetMessageIdusesroot_idfor P2P threads (was alwaysmessageId)skipReplyToInMessagesisfalsefor P2P threads soim.message.replyis used instead ofim.message.createthreadReplyistruefor P2P threadsFixes #38806
Test plan
🤖 Generated with Claude Code