mirror of
https://github.com/LLOneBot/LLOneBot.git
synced 2024-11-22 01:56:33 +00:00
chore
This commit is contained in:
parent
d36ea93e63
commit
b3299ba1e3
@ -187,12 +187,12 @@ export class NTQQUserApi extends Service {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async getUidByUinV1(Uin: string) {
|
async getUidByUinV1(uin: string) {
|
||||||
const session = getSession()
|
const session = getSession()
|
||||||
// 通用转换开始尝试
|
// 通用转换开始尝试
|
||||||
let uid = (await session?.getUixConvertService().getUid([Uin]))?.uidInfo.get(Uin)
|
let uid = (await session?.getUixConvertService().getUid([uin]))?.uidInfo.get(uin)
|
||||||
if (!uid) {
|
if (!uid) {
|
||||||
let unveifyUid = (await this.getUserDetailInfoByUin(Uin)).info.uid //从QQ Native 特殊转换 方法三
|
let unveifyUid = (await this.getUserDetailInfoByUin(uin)).info.uid //从QQ Native 特殊转换 方法三
|
||||||
if (unveifyUid.indexOf('*') == -1) {
|
if (unveifyUid.indexOf('*') == -1) {
|
||||||
uid = unveifyUid
|
uid = unveifyUid
|
||||||
}
|
}
|
||||||
@ -221,11 +221,11 @@ export class NTQQUserApi extends Service {
|
|||||||
if (unveifyUid.indexOf('*') == -1) return unveifyUid
|
if (unveifyUid.indexOf('*') == -1) return unveifyUid
|
||||||
}
|
}
|
||||||
|
|
||||||
async getUidByUin(Uin: string) {
|
async getUidByUin(uin: string) {
|
||||||
if (getBuildVersion() >= 26702) {
|
if (getBuildVersion() >= 26702) {
|
||||||
return await this.getUidByUinV2(Uin)
|
return this.getUidByUinV2(uin)
|
||||||
}
|
}
|
||||||
return await this.getUidByUinV1(Uin)
|
return this.getUidByUinV1(uin)
|
||||||
}
|
}
|
||||||
|
|
||||||
async getUserDetailInfoByUinV2(uin: string) {
|
async getUserDetailInfoByUinV2(uin: string) {
|
||||||
@ -247,25 +247,25 @@ export class NTQQUserApi extends Service {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async getUserDetailInfoByUin(Uin: string) {
|
async getUserDetailInfoByUin(uin: string) {
|
||||||
return NTEventDispatch.CallNoListenerEvent
|
return NTEventDispatch.CallNoListenerEvent
|
||||||
<(Uin: string) => Promise<UserDetailInfoByUin>>(
|
<(Uin: string) => Promise<UserDetailInfoByUin>>(
|
||||||
'NodeIKernelProfileService/getUserDetailInfoByUin',
|
'NodeIKernelProfileService/getUserDetailInfoByUin',
|
||||||
5000,
|
5000,
|
||||||
Uin
|
uin
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
async getUinByUidV1(Uid: string) {
|
async getUinByUidV1(uid: string) {
|
||||||
const ret = await NTEventDispatch.CallNoListenerEvent
|
const ret = await NTEventDispatch.CallNoListenerEvent
|
||||||
<(Uin: string[]) => Promise<{ uinInfo: Map<string, string> }>>(
|
<(Uin: string[]) => Promise<{ uinInfo: Map<string, string> }>>(
|
||||||
'NodeIKernelUixConvertService/getUin',
|
'NodeIKernelUixConvertService/getUin',
|
||||||
5000,
|
5000,
|
||||||
[Uid]
|
[uid]
|
||||||
)
|
)
|
||||||
let uin = ret.uinInfo.get(Uid)
|
let uin = ret.uinInfo.get(uid)
|
||||||
if (!uin) {
|
if (!uin) {
|
||||||
uin = (await this.getUserDetailInfo(Uid)).uin //从QQ Native 转换
|
uin = (await this.getUserDetailInfo(uid)).uin //从QQ Native 转换
|
||||||
}
|
}
|
||||||
return uin
|
return uin
|
||||||
}
|
}
|
||||||
@ -293,11 +293,11 @@ export class NTQQUserApi extends Service {
|
|||||||
return uin
|
return uin
|
||||||
}
|
}
|
||||||
|
|
||||||
async getUinByUid(Uid: string) {
|
async getUinByUid(uid: string) {
|
||||||
if (getBuildVersion() >= 26702) {
|
if (getBuildVersion() >= 26702) {
|
||||||
return (await this.getUinByUidV2(Uid))!
|
return this.getUinByUidV2(uid)
|
||||||
}
|
}
|
||||||
return await this.getUinByUidV1(Uid)
|
return this.getUinByUidV1(uid)
|
||||||
}
|
}
|
||||||
|
|
||||||
async forceFetchClientKey() {
|
async forceFetchClientKey() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user