diff --git a/extensions/feishu/src/bot.checkBotMentioned.test.ts b/extensions/feishu/src/bot.checkBotMentioned.test.ts index 0bc6cf69d..c4368a4e9 100644 --- a/extensions/feishu/src/bot.checkBotMentioned.test.ts +++ b/extensions/feishu/src/bot.checkBotMentioned.test.ts @@ -103,4 +103,26 @@ describe("parseFeishuMessageEvent – mentionedBot", () => { const ctx = parseFeishuMessageEvent(event as any, "ou_bot_123"); expect(ctx.mentionedBot).toBe(false); }); + + it("returns mentionedBot=false for post message with at for another user", () => { + const postContent = JSON.stringify({ + content: [ + [{ tag: "at", user_id: "ou_other", user_name: "other" }], + [{ tag: "text", text: "hello" }], + ], + }); + const event = { + sender: { sender_id: { user_id: "u1", open_id: "ou_sender" } }, + message: { + message_id: "msg_1", + chat_id: "oc_chat1", + chat_type: "group", + message_type: "post", + content: postContent, + mentions: [], + }, + }; + const ctx = parseFeishuMessageEvent(event as any, "ou_bot_123"); + expect(ctx.mentionedBot).toBe(false); + }); });