This commit is contained in:
idranme 2024-09-07 21:51:17 +08:00
parent dd34286b43
commit 709c0b6f7b
No known key found for this signature in database
GPG Key ID: 926F7B5B668E495F
2 changed files with 3 additions and 6 deletions

View File

@ -89,11 +89,8 @@ export class NTQQFriendApi extends Service {
afterFirstCmd: false, afterFirstCmd: false,
} }
) )
const categoryUids: Map<number, string[]> = new Map() const uids = data.buddyCategory.flatMap(item => item.buddyUids)
for (const item of data.buddyCategory) { return Object.values(data.userSimpleInfos).filter(v => uids.includes(v.uid!))
categoryUids.set(item.categoryId, item.buddyUids)
}
return Object.values(data.userSimpleInfos).filter(v => v.baseInfo && categoryUids.get(v.baseInfo.categoryId)?.includes(v.uid!))
} }
} }

View File

@ -399,7 +399,7 @@ class OneBot11Adapter extends Service {
this.handleRecallMsg(input) this.handleRecallMsg(input)
}) })
this.ctx.on('nt/message-sent', input => { this.ctx.on('nt/message-sent', input => {
this.handleRecallMsg(input) this.handleMsg(input)
}) })
this.ctx.on('nt/group-notify', input => { this.ctx.on('nt/group-notify', input => {
this.handleGroupNotify(input) this.handleGroupNotify(input)