pl-api: Allow reblogging to a given scope
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
@ -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);
|
||||
},
|
||||
|
||||
@ -85,19 +85,18 @@ const AKKOMA = 'akkoma';
|
||||
*/
|
||||
const GLITCH = 'glitch';
|
||||
|
||||
/**
|
||||
* Rebased, the recommended backend for Soapbox.
|
||||
* @see {@link https://gitlab.com/soapbox-pub/rebased}
|
||||
*/
|
||||
// NOTE: Rebased is named 'soapbox' for legacy reasons.
|
||||
const REBASED = 'soapbox';
|
||||
|
||||
/**
|
||||
* Pl, fork of Pleroma developed by pl-api author.
|
||||
* @see {@link https://github.com/mkljczk/pl}
|
||||
*/
|
||||
const PL = 'pl';
|
||||
|
||||
/**
|
||||
* Rebased, fork of Pleroma developed by Soapbox author.
|
||||
* @see {@link https://gitlab.com/soapbox-pub/rebased}
|
||||
*/
|
||||
const REBASED = 'soapbox';
|
||||
|
||||
/** Backend name reserved only for tests. */
|
||||
const UNRELEASED = 'unreleased';
|
||||
|
||||
@ -948,6 +947,15 @@ const getFeatures = (instance?: Instance) => {
|
||||
instance?.feature_quote === true,
|
||||
]),
|
||||
|
||||
/**
|
||||
* Ability to boost a status to a selected scope.
|
||||
* @see POST /api/v1/statuses/:id/reblog
|
||||
*/
|
||||
reblogVisibility: any([
|
||||
v.software === MASTODON,
|
||||
v.software === PLEROMA,
|
||||
]),
|
||||
|
||||
/**
|
||||
* Interact with statuses from another instance while logged-out.
|
||||
* @see POST /api/v1/pleroma/remote_interaction
|
||||
|
||||
Reference in New Issue
Block a user