Skip to content

Commit

Permalink
Merge pull request #270 from cnxysoft/upmain
Browse files Browse the repository at this point in the history
fix: Uid转Uin
  • Loading branch information
MliKiowa authored Aug 17, 2024
2 parents 9676b1d + ddbffe5 commit b5f2226
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/core/apis/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/onebot/action/go-cqhttp/GetStrangerInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default class GoCQHTTPGetStrangerInfo extends BaseAction<Payload, OB11Use
sex: OB11UserSex.unknown,
age: extendData.detail.simpleInfo.baseInfo.age || 0,
qid: extendData.detail.simpleInfo.baseInfo.qid,
level: calcQQLevel(extendData.detail.commonExt.qqLevel) || 0,
level: calcQQLevel(extendData.detail.commonExt?.qqLevel ?? 0) || 0,
login_days: 0,
uid: ''
};
Expand Down

0 comments on commit b5f2226

Please sign in to comment.