make favourited_by functional
This commit is contained in:
parent
1446514442
commit
74213ba2b9
|
@ -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 New Issue