From 2c12ff916d3b0a6a1b2d9a6d2b2a00cddfa6ad77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?nicole=20miko=C5=82ajczyk?= Date: Tue, 2 Sep 2025 12:05:29 +0200 Subject: [PATCH] pl-api: update software support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: nicole mikołajczyk --- packages/pl-api/lib/client.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/pl-api/lib/client.ts b/packages/pl-api/lib/client.ts index 9ca7ed23b..f786d509b 100644 --- a/packages/pl-api/lib/client.ts +++ b/packages/pl-api/lib/client.ts @@ -3942,7 +3942,7 @@ class PlApiClient { deleteAccount: async (accountId: string) => { let response; - if (this.features.mastodonAdmin) { + if (this.features.mastodonAdmin || this.features.version.software === MITRA) { response = await this.request(`/api/v1/admin/accounts/${accountId}`, { method: 'DELETE' }); } else { const account = await this.admin.accounts.getAccount(accountId)!; @@ -4387,7 +4387,13 @@ class PlApiClient { * @see {@link https://docs.pleroma.social/backend/development/API/admin_api/#delete-apiv1pleromaadminstatusesid} */ deleteStatus: async (statusId: string) => { - const response = await this.request(`/api/v1/pleroma/admin/statuses/${statusId}`, { method: 'DELETE' }); + let response; + + if (this.features.version.software === MITRA) { + response = await this.request(`/api/v1/admin/posts/${statusId}`, { method: 'DELETE' }); + } else { + response = await this.request(`/api/v1/pleroma/admin/statuses/${statusId}`, { method: 'DELETE' }); + } return response.json as {}; },