mirror of
https://github.com/LLOneBot/LLOneBot.git
synced 2024-11-22 01:56:33 +00:00
chore
This commit is contained in:
@@ -58,7 +58,7 @@ export class NTQQFriendApi extends Service {
|
|||||||
return Object.values(data.userSimpleInfos).filter(v => uids.includes(v.uid!))
|
return Object.values(data.userSimpleInfos).filter(v => uids.includes(v.uid!))
|
||||||
}
|
}
|
||||||
|
|
||||||
/** uid => uin */
|
/** uid -> uin */
|
||||||
async getBuddyIdMap(refresh = false): Promise<Map<string, string>> {
|
async getBuddyIdMap(refresh = false): Promise<Map<string, string>> {
|
||||||
const retMap: Map<string, string> = new Map()
|
const retMap: Map<string, string> = new Map()
|
||||||
const data = await invoke<{
|
const data = await invoke<{
|
||||||
|
@@ -52,7 +52,7 @@ export class NTQQMsgApi extends Service {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getMsgHistory(peer: Peer, msgId: string, cnt: number, queryOrder = false) {
|
async getMsgHistory(peer: Peer, msgId: string, cnt: number, queryOrder = false) {
|
||||||
// 默认情况下消息时间从旧到新
|
// 默认情况下消息时间从新到旧
|
||||||
return await invoke(NTMethod.HISTORY_MSG, [{ peer, msgId, cnt, queryOrder }])
|
return await invoke(NTMethod.HISTORY_MSG, [{ peer, msgId, cnt, queryOrder }])
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -93,7 +93,7 @@ export class NTQQMsgApi extends Service {
|
|||||||
const uniqueId = await this.generateMsgUniqueId(destPeer.chatType)
|
const uniqueId = await this.generateMsgUniqueId(destPeer.chatType)
|
||||||
destPeer.guildId = uniqueId
|
destPeer.guildId = uniqueId
|
||||||
const data = await invoke<{ msgList: RawMessage[] }>(
|
const data = await invoke<{ msgList: RawMessage[] }>(
|
||||||
'nodeIKernelMsgService/forwardMsg',
|
'nodeIKernelMsgService/forwardMsgWithComment',
|
||||||
[{
|
[{
|
||||||
msgIds,
|
msgIds,
|
||||||
srcContact: srcPeer,
|
srcContact: srcPeer,
|
||||||
@@ -111,7 +111,8 @@ export class NTQQMsgApi extends Service {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
}
|
},
|
||||||
|
timeout: 3000
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
delete destPeer.guildId
|
delete destPeer.guildId
|
||||||
|
@@ -178,7 +178,7 @@ export class NTQQUserApi extends Service {
|
|||||||
if (uin) return uin
|
if (uin) return uin
|
||||||
uin = (await invoke('nodeIKernelUixConvertService/getUin', [{ uids: [uid] }])).uinInfo.get(uid)
|
uin = (await invoke('nodeIKernelUixConvertService/getUin', [{ uids: [uid] }])).uinInfo.get(uid)
|
||||||
if (uin) return uin
|
if (uin) return uin
|
||||||
uin = (await this.ctx.ntFriendApi.getBuddyIdMap(true)).get(uid)
|
uin = (await this.ctx.ntFriendApi.getBuddyIdMap()).get(uid)
|
||||||
if (uin) return uin
|
if (uin) return uin
|
||||||
uin = (await this.getUserDetailInfo(uid)).uin
|
uin = (await this.getUserDetailInfo(uid)).uin
|
||||||
return uin
|
return uin
|
||||||
|
Reference in New Issue
Block a user