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.
This commit is contained in:
倪程伟 2026-05-18 17:46:28 +08:00 committed by GitHub
parent cda001b818
commit b763022810
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)