From b763022810b54601c3bf86ec44857985ac164b41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=80=AA=E7=A8=8B=E4=BC=9F?= Date: Mon, 18 May 2026 17:46:28 +0800 Subject: [PATCH] fix(feishu): add handler for im.chat.member.bot.added_v1 event Register a no-op handler for the bot-added-to-chat event on the Feishu WebSocket EventDispatcher. Without it, adding the bot to a group chat raises HandlerNotFoundException and drops the long connection. Mirrors the existing reaction-event handlers. Fixes #153. --- .../java/vip/mate/channel/feishu/FeishuChannelAdapter.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mateclaw-server/src/main/java/vip/mate/channel/feishu/FeishuChannelAdapter.java b/mateclaw-server/src/main/java/vip/mate/channel/feishu/FeishuChannelAdapter.java index 1a751bc9..f21f70e9 100644 --- a/mateclaw-server/src/main/java/vip/mate/channel/feishu/FeishuChannelAdapter.java +++ b/mateclaw-server/src/main/java/vip/mate/channel/feishu/FeishuChannelAdapter.java @@ -230,6 +230,11 @@ public class FeishuChannelAdapter extends AbstractChannelAdapter { @Override public void handle(com.lark.oapi.service.im.v1.model.P2MessageReactionDeletedV1 event) {} }) + // Silently ignore bot added to chat event to avoid HandlerNotFoundException (#153) + .onP2ChatMemberBotAddedV1(new ImService.P2ChatMemberBotAddedV1Handler() { + @Override + public void handle(com.lark.oapi.service.im.v1.model.P2ChatMemberBotAddedV1 event) {} + }) .build(); return new com.lark.oapi.ws.Client.Builder(appId, appSecret)