make favourited_by functional

This commit is contained in:
Mar0xy 2023-09-25 03:42:45 +02:00
parent 1446514442
commit 74213ba2b9
No known key found for this signature in database
GPG key ID: 56569BBE47D2C828

View file

@ -1189,10 +1189,15 @@ export default class Misskey implements MegalodonInterface {
} }
public async getStatusFavouritedBy(_id: string): Promise<Response<Array<Entity.Account>>> { public async getStatusFavouritedBy(_id: string): Promise<Response<Array<Entity.Account>>> {
return new Promise((_, reject) => { return this.client.post<Array<MisskeyAPI.Entity.Reaction>>("/api/notes/reactions", {
const err = new NoImplementedError('misskey does not support') noteId: _id,
reject(err)
}) })
.then(async (res) => ({
...res,
data: (
await Promise.all(res.data.map((n) => this.getAccount(n.user.id)))
).map((p) => p.data),
}));
} }
/** /**