diff --git a/src/onebot/api/msg.ts b/src/onebot/api/msg.ts index 7cfff9d5..c8090c0b 100644 --- a/src/onebot/api/msg.ts +++ b/src/onebot/api/msg.ts @@ -629,7 +629,7 @@ export class OneBotMsgApi { if (element.grayTipElement.subElementType == NTGrayTipElementSubTypeV2.GRAYTIP_ELEMENT_SUBTYPE_XMLMSG) { //好友添加成功事件 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))); } } }