[mastodon-client] populate user data for favorited_by and reblogged_by

This commit is contained in:
Laura Hausmann 2023-07-07 22:51:07 +02:00
parent 2d47cdf53f
commit f33ccfc98a
No known key found for this signature in database
GPG Key ID: D044E84C5BE01605
1 changed files with 4 additions and 4 deletions

View File

@ -1481,9 +1481,9 @@ export default class Misskey implements MegalodonInterface {
.post<Array<MisskeyAPI.Entity.Note>>('/api/notes/renotes', {
noteId: id
})
.then(res => ({
.then(async res => ({
...res,
data: res.data.map(n => this.converter.user(n.user))
data: (await Promise.all(res.data.map(n => this.getAccount(n.user.id)))).map(p => p.data)
}))
}
@ -1492,9 +1492,9 @@ export default class Misskey implements MegalodonInterface {
.post<Array<MisskeyAPI.Entity.Reaction>>('/api/notes/reactions', {
noteId: id
})
.then(res => ({
.then(async res => ({
...res,
data: res.data.map(n => this.converter.user(n.user))
data: (await Promise.all(res.data.map(n => this.getAccount(n.user.id)))).map(p => p.data)
}))
}