fix: 烘焙raw

This commit is contained in:
手瓜一十雪
2025-03-26 21:51:51 +08:00
parent 12eacd3530
commit 673a175ddf
3 changed files with 10 additions and 5 deletions

View File

@@ -16,7 +16,7 @@ export interface NodeIKernelBuddyService {
getBuddyListFromCache(reqType: BuddyListReqType): Promise<Array<
{
categoryId: number,//9999应该跳过 那是兜底数据吧
categoryId: number,//9999为特别关心
categorySortId: number,//排序方式
categroyName: string,//分类名
categroyMbCount: number,//不懂

View File

@@ -14,8 +14,8 @@ export default class GetFriendList extends OneBotAction<Payload, OB11User[]> {
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());
}
}

View File

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