Compare commits

...

2 Commits

Author SHA1 Message Date
手瓜一十雪
e8d6f86458 feat: 修复一些问题 2025-11-07 19:35:35 +08:00
手瓜一十雪
a000ffdf0d fix: buddylist 2025-11-07 19:29:39 +08:00
5 changed files with 78 additions and 59 deletions

2
.gitignore vendored
View File

@@ -15,3 +15,5 @@ devconfig/*
checkVersion.sh
bun.lockb
tests/run/
guild1.db-wal
guild1.db-shm

View File

@@ -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',

View File

@@ -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;
}

Binary file not shown.