From 64c41632e3b899b75e2c9c9ac36637fa0a21eddd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B2=A9=E6=B5=86?= Date: Tue, 3 Dec 2024 15:00:42 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20[onebot11]message.sub=5Fevent=E6=9C=AA?= =?UTF-8?q?=E6=8C=89=E6=A0=87=E5=87=86=E5=88=A4=E6=96=AD=EF=BC=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根据onebot11标准,私聊的sub_type为'friend'/‘group’/'other',群消息的sub_type为'normal'/'anonymous'/'notice' --- src/adapter/onebot/11/event.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/adapter/onebot/11/event.ts b/src/adapter/onebot/11/event.ts index c90b8399..7d49d6e2 100644 --- a/src/adapter/onebot/11/event.ts +++ b/src/adapter/onebot/11/event.ts @@ -52,7 +52,7 @@ export class OB11Event { const message = { event: EventType.Message as EventType.Message, event_id: data.message_id + '', - sub_event: data.sub_type === 'friend' ? MessageSubType.PrivateMessage : MessageSubType.GroupMessage, + sub_event: data.message_type === 'private' ? MessageSubType.PrivateMessage : MessageSubType.GroupMessage, raw_event: data, self_id: data.self_id + '', user_id: data.sender.user_id + '',