← Back to PRs

#13211: feat(feishu): skip reply-to in DM conversations

by Vincentwei1021 open 2026-02-10 06:41 View on GitHub →
channel: feishu stale
## Problem In Feishu DM (p2p) chats, every bot response shows a 'Reply to' quote referencing the user's last message. This is unnecessary in 1-on-1 conversations and clutters the chat interface. ## Root Cause `createFeishuReplyDispatcher` in `bot.ts` always passes `replyToMessageId: ctx.messageId`, which causes `send.ts` to use the `im.message.reply()` API instead of `im.message.create()`. The reply API inherently adds the 'Reply to' reference. ## Fix Only pass `replyToMessageId` in group chats where reply context is useful. In DMs, pass `undefined` so messages are sent via `im.message.create()` without reply references. ```typescript // Before replyToMessageId: ctx.messageId, // After replyToMessageId: isGroup ? ctx.messageId : undefined, ``` Both call sites in `bot.ts` are updated (normal message dispatch and permission error dispatch). ## Testing Tested in production Feishu DM — bot messages no longer show 'Reply to' in DMs while group chat behavior is preserved. <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR changes Feishu reply dispatch so DMs no longer send via `im.message.reply()` (which shows a “Reply to” quote) by conditionally omitting `replyToMessageId` when `chat_type` is `p2p`. Group chats keep the existing reply behavior by still providing `replyToMessageId`. The change is localized to `extensions/feishu/src/bot.ts` call sites of `createFeishuReplyDispatcher`, and relies on `extensions/feishu/src/send.ts`’s branching between `message.reply` vs `message.create` based on whether `replyToMessageId` is set. <h3>Confidence Score: 3/5</h3> - This PR is close to safe to merge but introduces a clear DM behavior regression for typing indicators. - The core change (skipping reply-to in DMs) is small and consistent across both dispatcher call sites, but it interacts with existing typing-indicator logic that requires `replyToMessageId`, causing typing indicators to never start in DMs. - extensions/feishu/src/reply-dispatcher.ts (typing indicator gating on replyToMessageId), extensions/feishu/src/bot.ts (DM replyToMessageId now undefined) <!-- greptile_other_comments_section --> <sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub> <!-- /greptile_comment -->

Most Similar PRs