From 90e1eaa62dd64623c392a2dac6219e9f6f661c9c Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Fri, 7 Jul 2023 22:51:07 +0200 Subject: [PATCH] [mastodon-client] populate user data for favorited_by and reblogged_by --- packages/megalodon/src/misskey.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/megalodon/src/misskey.ts b/packages/megalodon/src/misskey.ts index dda108deb..cc589197d 100644 --- a/packages/megalodon/src/misskey.ts +++ b/packages/megalodon/src/misskey.ts @@ -1481,9 +1481,9 @@ export default class Misskey implements MegalodonInterface { .post>('/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>('/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) })) }