pl-api: Allow reblogging to a given scope

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak
2024-09-10 12:11:52 +02:00
parent 06ee19d168
commit 524192c4f0
2 changed files with 17 additions and 9 deletions

View File

@ -1896,8 +1896,8 @@ class PlApiClient {
* Reshare a status on your own profile.
* @see {@link https://docs.joinmastodon.org/methods/statuses/#reblog}
*/
reblogStatus: async (statusId: string) => {
const response = await this.request(`/api/v1/statuses/${statusId}/reblog`, { method: 'POST' });
reblogStatus: async (statusId: string, visibility?: string) => {
const response = await this.request(`/api/v1/statuses/${statusId}/reblog`, { method: 'POST', body: { visibility } });
return statusSchema.parse(response.json);
},