Merge pull request #375 from cnxysoft/test

fix: friend_add
This commit is contained in:
Alen 2024-09-15 16:49:10 +08:00 committed by GitHub
commit 166c30fe2c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -629,7 +629,7 @@ export class OneBotMsgApi {
if (element.grayTipElement.subElementType == NTGrayTipElementSubTypeV2.GRAYTIP_ELEMENT_SUBTYPE_XMLMSG) { if (element.grayTipElement.subElementType == NTGrayTipElementSubTypeV2.GRAYTIP_ELEMENT_SUBTYPE_XMLMSG) {
//好友添加成功事件 //好友添加成功事件
if (element.grayTipElement.xmlElement.templId === '10229' && msg.peerUin !== '') { if (element.grayTipElement.xmlElement.templId === '10229' && msg.peerUin !== '') {
return new OB11FriendAddNoticeEvent(this.core, parseInt(msg.peerUin)); return new OB11FriendAddNoticeEvent(this.core, parseInt(msg.peerUin) || Number(await this.core.apis.UserApi.getUinByUidV2(msg.peerUid)));
} }
} }
} }