diff --git a/extensions/feishu/src/monitor.account.ts b/extensions/feishu/src/monitor.account.ts index 65e5a531c38c..530e4fcb5125 100644 --- a/extensions/feishu/src/monitor.account.ts +++ b/extensions/feishu/src/monitor.account.ts @@ -306,6 +306,9 @@ function registerEventHandlers( "im.message.message_read_v1": async () => { // Ignore read receipts }, + "im.chat.access_event.bot_p2p_chat_entered_v1": async () => { + // Ignore p2p chat entry notifications — no action needed + }, "im.chat.member.bot.added_v1": async (data) => { try { const event = parseFeishuBotAddedEventPayload(data); diff --git a/extensions/feishu/src/monitor.webhook-e2e.test.ts b/extensions/feishu/src/monitor.webhook-e2e.test.ts index c95a907a1c95..ee71bce82841 100644 --- a/extensions/feishu/src/monitor.webhook-e2e.test.ts +++ b/extensions/feishu/src/monitor.webhook-e2e.test.ts @@ -363,6 +363,32 @@ describe("Feishu webhook signed-request e2e", () => { ); }); + it("does not emit unhandled-event warning for bot_p2p_chat_entered_v1", async () => { + probeFeishuMock.mockResolvedValue({ ok: true, botOpenId: "bot_open_id" }); + + await withRunningWebhookMonitor( + { + accountId: "p2p-chat-entered", + path: "/hook-e2e-p2p-chat-entered", + verificationToken: "verify_token", + encryptKey: "encrypt_key", + }, + monitorFeishuProvider, + async (url) => { + const payload = { + schema: "2.0", + header: { event_type: "im.chat.access_event.bot_p2p_chat_entered_v1" }, + event: {}, + }; + const response = await postSignedPayload(url, payload); + + expect(response.status).toBe(200); + const body = await response.text(); + expect(body).not.toContain("no im.chat.access_event.bot_p2p_chat_entered_v1 event handle"); + }, + ); + }); + it("accepts signed encrypted url_verification challenges end-to-end", async () => { probeFeishuMock.mockResolvedValue({ ok: true, botOpenId: "bot_open_id" });