Skip to content

fix(feishu): reply to triggering message in group reply chains#33011

Closed
liuxiaopai-ai wants to merge 1 commit intoopenclaw:mainfrom
liuxiaopai-ai:codex/feishu-reply-target-32980
Closed

fix(feishu): reply to triggering message in group reply chains#33011
liuxiaopai-ai wants to merge 1 commit intoopenclaw:mainfrom
liuxiaopai-ai:codex/feishu-reply-target-32980

Conversation

@liuxiaopai-ai
Copy link
Copy Markdown
Contributor

Summary

  • fix Feishu group reply targeting to use the triggering inbound message id instead of root_id
  • keep rootId unchanged in reply dispatcher context for topic routing/thread affinity
  • add regression coverage and changelog entry

Testing

  • pnpm test extensions/feishu/src/bot.test.ts

Fixes #32980

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 3, 2026

Greptile Summary

This PR fixes an incorrect reply targeting in Feishu group reply chains: previously, when a user replied within a thread/topic, the bot would snap its response to the thread root (root_id) instead of the message that actually triggered it. The fix changes replyTargetMessageId from ctx.rootId ?? ctx.messageId to simply ctx.messageId, ensuring bot replies always attach to the triggering inbound message. The rootId value continues to be passed as a separate parameter to createFeishuReplyDispatcher for thread affinity and routing, so topic scoping behavior is unaffected.

Key changes:

  • extensions/feishu/src/bot.ts: Remove ctx.rootId ?? fallback so replyTargetMessageId is always the triggering message's id.
  • extensions/feishu/src/bot.test.ts: Update the regression test to assert replyToMessageId is the child/triggering message id ("om_child_message") while rootId remains "om_root_topic".
  • CHANGELOG.md: Accurate entry added under Fixes.

Confidence Score: 5/5

  • This PR is safe to merge — it is a minimal, targeted one-line logic fix with matching regression test coverage.
  • The change is a single-line fix that removes an incorrect ctx.rootId ?? fallback. The rootId is preserved for thread affinity via a separate parameter, so topic routing is unaffected. The test correctly validates both the new reply target and the preserved rootId. No edge cases are introduced: ctx.messageId is typed as a required string and is already used for deduplication and context fields throughout the file.
  • No files require special attention.

Last reviewed commit: eddaaf9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: feishu Channel integration: feishu size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(feishu): group reply targets root message instead of the triggering message

2 participants