From 74213ba2b957a19cc3605f44db73f589ddd3aa75 Mon Sep 17 00:00:00 2001 From: Mar0xy Date: Mon, 25 Sep 2023 03:42:45 +0200 Subject: [PATCH] make favourited_by functional --- packages/megalodon/src/misskey.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/megalodon/src/misskey.ts b/packages/megalodon/src/misskey.ts index 0d513651b1..f9858214d9 100644 --- a/packages/megalodon/src/misskey.ts +++ b/packages/megalodon/src/misskey.ts @@ -1189,10 +1189,15 @@ export default class Misskey implements MegalodonInterface { } public async getStatusFavouritedBy(_id: string): Promise>> { - return new Promise((_, reject) => { - const err = new NoImplementedError('misskey does not support') - reject(err) + return this.client.post>("/api/notes/reactions", { + noteId: _id, }) + .then(async (res) => ({ + ...res, + data: ( + await Promise.all(res.data.map((n) => this.getAccount(n.user.id))) + ).map((p) => p.data), + })); } /**