Skip to content

Commit

Permalink
fix: [onebot11]message.sub_event未按标准判断,
Browse files Browse the repository at this point in the history
根据onebot11标准,私聊的sub_type为'friend'/‘group’/'other',群消息的sub_type为'normal'/'anonymous'/'notice'
  • Loading branch information
lava081 committed Dec 3, 2024
1 parent d060e4f commit 64c4163
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/adapter/onebot/11/event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 + '',
Expand Down

0 comments on commit 64c4163

Please sign in to comment.