From df0c6fafbe62afcf1826e6254d210802e444d655 Mon Sep 17 00:00:00 2001 From: Alen Date: Sat, 17 Aug 2024 00:17:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20Uid=E8=BD=ACUin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复设置管理、禁言等数个API失效 对查询企业陌生人信息进行容错 --- src/core/apis/user.ts | 4 ++-- src/onebot/action/go-cqhttp/GetStrangerInfo.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/apis/user.ts b/src/core/apis/user.ts index 0a0d7d5b..7766fb7b 100644 --- a/src/core/apis/user.ts +++ b/src/core/apis/user.ts @@ -187,9 +187,9 @@ export class NTQQUserApi { //后期改成流水线处理 async getUidByUinV2(Uin: string) { - let uid = (await this.context.session.getProfileService().getUidByUin('FriendsServiceImpl', [Uin])).get(Uin); + let uid = (await this.context.session.getGroupService().getUidByUins([Uin])).uids.get(Uin); if (uid) return uid; - uid = (await this.context.session.getGroupService().getUidByUins([Uin])).uids.get(Uin); + uid = (await this.context.session.getProfileService().getUidByUin('FriendsServiceImpl', [Uin])).get(Uin); if (uid) return uid; uid = (await this.context.session.getUixConvertService().getUid([Uin])).uidInfo.get(Uin); if (uid) return uid; diff --git a/src/onebot/action/go-cqhttp/GetStrangerInfo.ts b/src/onebot/action/go-cqhttp/GetStrangerInfo.ts index 611369ed..aea502b7 100644 --- a/src/onebot/action/go-cqhttp/GetStrangerInfo.ts +++ b/src/onebot/action/go-cqhttp/GetStrangerInfo.ts @@ -34,7 +34,7 @@ export default class GoCQHTTPGetStrangerInfo extends BaseAction