fix: revert get_friends_with_category return type

This commit is contained in:
Clansty
2024-08-12 16:35:08 +08:00
parent 046ee91d22
commit 9b13bee3e0
5 changed files with 15 additions and 17 deletions

View File

@@ -8,7 +8,10 @@ export class GetFriendWithCategory extends BaseAction<void, any> {
async _handle(payload: void) {
if (this.CoreContext.context.basicInfoWrapper.requireMinNTQQBuild('26702')) {
//全新逻辑
return OB11Constructor.friendsV2(await this.CoreContext.apis.FriendApi.getBuddyV2ExWithCate(true));
return (await this.CoreContext.apis.FriendApi.getBuddyV2ExWithCate(true)).map(category => ({
...category,
buddyList: OB11Constructor.friendsV2(category.buddyList),
}));
} else {
throw new Error('this ntqq version not support, must be 26702 or later');
}