fix: preserve feishu message_id in agent-visible body (#27253) (thanks @xss925175263)

This commit is contained in:
Peter Steinberger
2026-02-26 13:01:46 +01:00
parent 6d52b47076
commit d671d7a0a2
3 changed files with 38 additions and 2 deletions

View File

@@ -841,8 +841,8 @@ export async function handleFeishuMessage(params: {
messageBody += `\n\n[System: Your reply will automatically @mention: ${targetNames}. Do not write @xxx yourself.]`;
}
// Include message_id in body so the agent can use it (e.g. for Feishu API media download or reply).
messageBody = `[message_id: ${ctx.messageId}] ${messageBody}`;
// Keep message_id on its own line so shared message-id hint stripping can parse it reliably.
messageBody = `[message_id: ${ctx.messageId}]\n${messageBody}`;
const envelopeFrom = isGroup ? `${ctx.chatId}:${ctx.senderOpenId}` : ctx.senderOpenId;