From 43f7f9a3631dcf791dc65c7b3306a50b8a227456 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Wed, 4 Sep 2024 12:37:23 +0800 Subject: [PATCH] build: test --- src/core/apis/user.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/core/apis/user.ts b/src/core/apis/user.ts index 87a0cee1..7c7897cb 100644 --- a/src/core/apis/user.ts +++ b/src/core/apis/user.ts @@ -75,7 +75,6 @@ export class NTQQUserApi { (profile) => profile.uid === uid, ); const RetUser: User = { - ...profile.simpleInfo.coreInfo, ...profile.simpleInfo.status, ...profile.simpleInfo.vasInfo, ...profile.commonExt, @@ -83,17 +82,22 @@ export class NTQQUserApi { qqLevel: profile.commonExt?.qqLevel, age: profile.simpleInfo.baseInfo.age, pendantId: '', + ...profile.simpleInfo.coreInfo }; return RetUser; } async getUserDetailInfo(uid: string): Promise { - const retUser = await solveAsyncProblem(async (uid) => this.fetchUserDetailInfo(uid, UserDetailSource.KDB), uid); + let retUser = await solveAsyncProblem(async (uid) => this.fetchUserDetailInfo(uid, UserDetailSource.KDB), uid); if (retUser && retUser.uin !== '0') { return retUser; } this.context.logger.logDebug('[NapCat] [Mark] getUserDetailInfo Mode1 Failed.'); - return this.fetchUserDetailInfo(uid, UserDetailSource.KSERVER); + retUser = await this.fetchUserDetailInfo(uid, UserDetailSource.KSERVER); + if (retUser && retUser.uin === '0') { + retUser.uin = await this.core.apis.UserApi.getUidByUinV2(uid) ?? '0'; + } + return retUser; } async modifySelfProfile(param: ModifyProfileParams) {