diff --git a/src/core/services/NodeIKernelBuddyService.ts b/src/core/services/NodeIKernelBuddyService.ts index 69dcfb05..dbb98165 100644 --- a/src/core/services/NodeIKernelBuddyService.ts +++ b/src/core/services/NodeIKernelBuddyService.ts @@ -16,7 +16,7 @@ export interface NodeIKernelBuddyService { getBuddyListFromCache(reqType: BuddyListReqType): Promise { override actionName = ActionName.GetFriendList; override payloadSchema = SchemaData; - async _handle(payload: Payload) { + async _handle(_payload: Payload) { //全新逻辑 - return OB11Construct.friends(await this.core.apis.FriendApi.getBuddy(typeof payload.no_cache === 'string' ? payload.no_cache === 'true' : !!payload.no_cache)); + return OB11Construct.friends(await this.core.apis.FriendApi.getBuddy()); } } diff --git a/src/onebot/helper/data.ts b/src/onebot/helper/data.ts index 8fa7f3cd..e0380966 100644 --- a/src/onebot/helper/data.ts +++ b/src/onebot/helper/data.ts @@ -20,9 +20,14 @@ export class OB11Construct { static friends(friends: FriendV2[]): OB11User[] { return friends.map(rawFriend => ({ - ...rawFriend.baseInfo, - ...rawFriend.coreInfo, + birthday_year: rawFriend.baseInfo.birthday_year, + birthday_month: rawFriend.baseInfo.birthday_month, + birthday_day: rawFriend.baseInfo.birthday_day, user_id: parseInt(rawFriend.coreInfo.uin), + age: rawFriend.baseInfo.age, + phone_num: rawFriend.baseInfo.phoneNum, + email: rawFriend.baseInfo.eMail, + category_id: rawFriend.baseInfo.categoryId, nickname: rawFriend.coreInfo.nick ?? '', remark: rawFriend.coreInfo.remark ?? rawFriend.coreInfo.nick, sex: this.sex(rawFriend.baseInfo.sex),