mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
fix: 烘焙raw
This commit is contained in:
@@ -16,7 +16,7 @@ export interface NodeIKernelBuddyService {
|
|||||||
|
|
||||||
getBuddyListFromCache(reqType: BuddyListReqType): Promise<Array<
|
getBuddyListFromCache(reqType: BuddyListReqType): Promise<Array<
|
||||||
{
|
{
|
||||||
categoryId: number,//9999应该跳过 那是兜底数据吧
|
categoryId: number,//9999为特别关心
|
||||||
categorySortId: number,//排序方式
|
categorySortId: number,//排序方式
|
||||||
categroyName: string,//分类名
|
categroyName: string,//分类名
|
||||||
categroyMbCount: number,//不懂
|
categroyMbCount: number,//不懂
|
||||||
|
@@ -14,8 +14,8 @@ export default class GetFriendList extends OneBotAction<Payload, OB11User[]> {
|
|||||||
override actionName = ActionName.GetFriendList;
|
override actionName = ActionName.GetFriendList;
|
||||||
override payloadSchema = SchemaData;
|
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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -20,9 +20,14 @@ export class OB11Construct {
|
|||||||
|
|
||||||
static friends(friends: FriendV2[]): OB11User[] {
|
static friends(friends: FriendV2[]): OB11User[] {
|
||||||
return friends.map(rawFriend => ({
|
return friends.map(rawFriend => ({
|
||||||
...rawFriend.baseInfo,
|
birthday_year: rawFriend.baseInfo.birthday_year,
|
||||||
...rawFriend.coreInfo,
|
birthday_month: rawFriend.baseInfo.birthday_month,
|
||||||
|
birthday_day: rawFriend.baseInfo.birthday_day,
|
||||||
user_id: parseInt(rawFriend.coreInfo.uin),
|
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 ?? '',
|
nickname: rawFriend.coreInfo.nick ?? '',
|
||||||
remark: rawFriend.coreInfo.remark ?? rawFriend.coreInfo.nick,
|
remark: rawFriend.coreInfo.remark ?? rawFriend.coreInfo.nick,
|
||||||
sex: this.sex(rawFriend.baseInfo.sex),
|
sex: this.sex(rawFriend.baseInfo.sex),
|
||||||
|
Reference in New Issue
Block a user