mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-10 06:03:08 +02:00
make favourited_by functional
This commit is contained in:
parent
1446514442
commit
74213ba2b9
1 changed files with 8 additions and 3 deletions
|
@ -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),
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue