mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-12-19 13:10:16 +08:00
fix: buddylist
This commit is contained in:
parent
202338a160
commit
a000ffdf0d
@ -17,8 +17,14 @@ export class NTQQFriendApi {
|
||||
|
||||
async getBuddyV2SimpleInfoMap () {
|
||||
const buddyService = this.context.session.getBuddyService();
|
||||
let uids: string[] = [];
|
||||
if (this.core.context.basicInfoWrapper.requireMinNTQQBuild('40990')) {
|
||||
const buddyListV2NT = await buddyService.getBuddyListV2('0', true, BuddyListReqType.KNOMAL);
|
||||
uids = buddyListV2NT.data.flatMap(item => item.buddyUids);
|
||||
} else {
|
||||
const buddyListV2 = await buddyService.getBuddyListV2('0', BuddyListReqType.KNOMAL);
|
||||
const uids = buddyListV2.data.flatMap(item => item.buddyUids);
|
||||
uids = buddyListV2.data.flatMap(item => item.buddyUids);
|
||||
}
|
||||
return await this.core.eventWrapper.callNoListenerEvent(
|
||||
'NodeIKernelProfileService/getCoreAndBaseInfo',
|
||||
'nodeStore',
|
||||
|
||||
@ -10,9 +10,20 @@ export interface NodeIKernelBuddyService {
|
||||
categroyName: string,
|
||||
categroyMbCount: number,
|
||||
onlineCount: number,
|
||||
buddyUids: Array<string>
|
||||
}>
|
||||
buddyUids: Array<string>;
|
||||
}>;
|
||||
}>;
|
||||
getBuddyListV2 (callFrom: string, isPullRefresh: boolean, reqType: BuddyListReqType): Promise<GeneralCallResult & {
|
||||
data: Array<{
|
||||
categoryId: number,
|
||||
categorySortId: number,
|
||||
categroyName: string,
|
||||
categroyMbCount: number,
|
||||
onlineCount: number,
|
||||
buddyUids: Array<string>;
|
||||
}>;
|
||||
}>;
|
||||
|
||||
|
||||
getBuddyListFromCache (reqType: BuddyListReqType): Promise<Array<
|
||||
{
|
||||
@ -21,7 +32,7 @@ export interface NodeIKernelBuddyService {
|
||||
categroyName: string, // 分类名
|
||||
categroyMbCount: number, // 不懂
|
||||
onlineCount: number, // 在线数目
|
||||
buddyUids: Array<string>// Uids
|
||||
buddyUids: Array<string>;// Uids
|
||||
}>>;
|
||||
|
||||
addKernelBuddyListener (listener: NodeIKernelBuddyListener): number;
|
||||
@ -36,7 +47,7 @@ export interface NodeIKernelBuddyService {
|
||||
|
||||
getBuddyRemark (uid: number): string;
|
||||
|
||||
setBuddyRemark(param: { uid: string, remark: string, signInfo?: unknown }): void;
|
||||
setBuddyRemark (param: { uid: string, remark: string, signInfo?: unknown; }): void;
|
||||
|
||||
getAvatarUrl (uid: number): string;
|
||||
|
||||
@ -118,7 +129,7 @@ export interface NodeIKernelBuddyService {
|
||||
|
||||
reportDoubtBuddyReqUnread (): void;
|
||||
|
||||
getBuddyRecommendContactArkJson(uid: string, phoneNumber: string): Promise<GeneralCallResult & { arkMsg: string }>;
|
||||
getBuddyRecommendContactArkJson (uid: string, phoneNumber: string): Promise<GeneralCallResult & { arkMsg: string; }>;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user