mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-03 22:21:13 +00:00
Lower NTQQ build check from 41679 to 39038
Update NTQQFriendApi to use a lower minimum NTQQ build threshold (39038) when deciding which buddyListV2 API path to call. The change replaces occurrences of '41679' with '39038' in packages/napcat-core/apis/friend.ts (affecting getBuddyV2SimpleInfoMap and the buddyListV2 retrieval logic) to broaden compatibility with older NTQQ builds.
This commit is contained in:
parent
c3b29f1ee6
commit
38f6dad118
@ -18,7 +18,7 @@ export class NTQQFriendApi {
|
|||||||
async getBuddyV2SimpleInfoMap () {
|
async getBuddyV2SimpleInfoMap () {
|
||||||
const buddyService = this.context.session.getBuddyService();
|
const buddyService = this.context.session.getBuddyService();
|
||||||
let uids: string[] = [];
|
let uids: string[] = [];
|
||||||
if (this.core.context.basicInfoWrapper.requireMinNTQQBuild('41679')) {
|
if (this.core.context.basicInfoWrapper.requireMinNTQQBuild('39038')) {
|
||||||
const buddyListV2NT = await buddyService.getBuddyListV2('0', true, BuddyListReqType.KNOMAL);
|
const buddyListV2NT = await buddyService.getBuddyListV2('0', true, BuddyListReqType.KNOMAL);
|
||||||
uids = buddyListV2NT.data.flatMap(item => item.buddyUids);
|
uids = buddyListV2NT.data.flatMap(item => item.buddyUids);
|
||||||
} else {
|
} else {
|
||||||
@ -55,7 +55,7 @@ export class NTQQFriendApi {
|
|||||||
const buddyService = this.context.session.getBuddyService();
|
const buddyService = this.context.session.getBuddyService();
|
||||||
let uids: string[] = [];
|
let uids: string[] = [];
|
||||||
let buddyListV2: Awaited<ReturnType<typeof buddyService.getBuddyListV2>>['data'];
|
let buddyListV2: Awaited<ReturnType<typeof buddyService.getBuddyListV2>>['data'];
|
||||||
if (this.core.context.basicInfoWrapper.requireMinNTQQBuild('41679')) {
|
if (this.core.context.basicInfoWrapper.requireMinNTQQBuild('39038')) {
|
||||||
buddyListV2 = (await buddyService.getBuddyListV2('0', true, BuddyListReqType.KNOMAL)).data;
|
buddyListV2 = (await buddyService.getBuddyListV2('0', true, BuddyListReqType.KNOMAL)).data;
|
||||||
uids = buddyListV2.flatMap(item => item.buddyUids);
|
uids = buddyListV2.flatMap(item => item.buddyUids);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user