#13211: feat(feishu): skip reply-to in DM conversations
channel: feishu
stale
Cluster:
Feishu Enhancements and Fixes
## 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
#19793: feat(feishu): reply-in-thread, parallel group sessions, and fire-an...
by yinsn · 2026-02-18
85.7%
#19027: fix(feishu): keep chunked messages in topic/thread context
by qiangu · 2026-02-17
82.1%
#18529: feat(feishu): add parentId and rootId to inbound context for quote/...
by qiangu · 2026-02-16
81.7%
#10309: fix: use group ID for peer.id in Feishu group messages
by ParsifalC · 2026-02-06
79.8%
#22675: feishu: move message dedup to just before dispatch
by zijiegeng · 2026-02-21
78.5%
#9253: Fix: Feishu chat ID mismatch causing session context confusion
by vishaltandale00 · 2026-02-05
78.4%
#10407: fix(feishu): Remove incorrect oc_ prefix assumption in resolveFeish...
by Bermudarat · 2026-02-06
78.4%
#21484: fix(feishu): scope message deduplication by accountId to support mu...
by guanyu-zhang · 2026-02-20
77.4%
#13761: fix(feishu): silently degrade when contact permission is missing
by echoVic · 2026-02-11
77.4%
#9662: fix(feishu): include sender ID in direct messages for auth
by cszhouwei · 2026-02-05
76.9%