From c4b5f3427177833825cbdb02222b15eadcc24523 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 Dec 2024 22:02:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=85=9C=E5=BA=95=20=E9=98=B2=E6=AD=A2?= =?UTF-8?q?=E8=BF=9B=E5=85=A5=E5=BD=B1=E5=93=8D=E9=80=9F=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/apis/user.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/core/apis/user.ts b/src/core/apis/user.ts index a715d83d..f2b9bb0a 100644 --- a/src/core/apis/user.ts +++ b/src/core/apis/user.ts @@ -170,6 +170,9 @@ export class NTQQUserApi { } async getUidByUinV2(Uin: string) { + if (!Uin) { + return ''; + } const services = [ () => this.context.session.getUixConvertService().getUid([Uin]).then((data) => data.uidInfo.get(Uin)).catch(() => undefined), () => promisify> @@ -188,6 +191,9 @@ export class NTQQUserApi { } async getUinByUidV2(Uid: string) { + if (!Uid) { + return '0'; + } const services = [ () => this.context.session.getUixConvertService().getUin([Uid]).then((data) => data.uinInfo.get(Uid)).catch(() => undefined), () => this.context.session.getGroupService().getUinByUids([Uid]).then((data) => data.uins.get(Uid)).catch(() => undefined),