diff --git a/packages/pl-api/lib/client.ts b/packages/pl-api/lib/client.ts index b94415319..d4cfe78c5 100644 --- a/packages/pl-api/lib/client.ts +++ b/packages/pl-api/lib/client.ts @@ -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); }, diff --git a/packages/pl-api/lib/features.ts b/packages/pl-api/lib/features.ts index bbf8a6978..5d9616134 100644 --- a/packages/pl-api/lib/features.ts +++ b/packages/pl-api/lib/features.ts @@ -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