mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-29 05:17:39 -07:00
[mastodon-client] populate user details for account following/followers
This commit is contained in:
parent
d7e63edbd7
commit
57f35be999
1 changed files with 10 additions and 10 deletions
|
@ -474,11 +474,11 @@ export default class Misskey implements MegalodonInterface {
|
||||||
limit: 40
|
limit: 40
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return this.client.post<Array<MisskeyAPI.Entity.Follower>>('/api/users/followers', params).then(res => {
|
return this.client.post<Array<MisskeyAPI.Entity.Follower>>('/api/users/followers', params).then(async res => {
|
||||||
return Object.assign(res, {
|
return Object.assign(res, {
|
||||||
data: res.data.map(f => this.converter.follower(f))
|
data: (await Promise.all(res.data.map(async f => (this.getAccount(f.followerId)).then(p => p.data))))
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -502,11 +502,11 @@ export default class Misskey implements MegalodonInterface {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return this.client.post<Array<MisskeyAPI.Entity.Following>>('/api/users/following', params).then(res => {
|
return this.client.post<Array<MisskeyAPI.Entity.Following>>('/api/users/following', params).then(async res => {
|
||||||
return Object.assign(res, {
|
return Object.assign(res, {
|
||||||
data: res.data.map(f => this.converter.following(f))
|
data: (await Promise.all(res.data.map(async f => (this.getAccount(f.followeeId)).then(p => p.data))))
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
public async getAccountLists(_id: string): Promise<Response<Array<Entity.List>>> {
|
public async getAccountLists(_id: string): Promise<Response<Array<Entity.List>>> {
|
||||||
|
|
Loading…
Reference in a new issue