fix(feishu): register no-op handlers for reaction events (#140)

The Feishu SDK EventDispatcher had no handler registered for im.message.reaction.created_v1 / deleted_v1, so adding or removing an emoji reaction raised HandlerNotFoundException and logged an ERROR stack trace. Register no-op handlers to silently ignore these events.
This commit is contained in:
倪程伟 2026-05-16 15:28:59 +08:00 committed by GitHub
parent dca71b5a43
commit a386b31e9b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -221,6 +221,15 @@ public class FeishuChannelAdapter extends AbstractChannelAdapter {
}
}
})
// 静默忽略消息表情回应事件避免 HandlerNotFoundException
.onP2MessageReactionCreatedV1(new ImService.P2MessageReactionCreatedV1Handler() {
@Override
public void handle(com.lark.oapi.service.im.v1.model.P2MessageReactionCreatedV1 event) {}
})
.onP2MessageReactionDeletedV1(new ImService.P2MessageReactionDeletedV1Handler() {
@Override
public void handle(com.lark.oapi.service.im.v1.model.P2MessageReactionDeletedV1 event) {}
})
.build();
return new com.lark.oapi.ws.Client.Builder(appId, appSecret)