From e858c5921ae2c6615bf6586db37c4a4cabe3c2c1 Mon Sep 17 00:00:00 2001 From: mkljczk Date: Tue, 25 Feb 2025 00:18:29 +0100 Subject: [PATCH] pl-api: fix reports resolving on gotosocial Signed-off-by: mkljczk --- packages/pl-api/lib/client.ts | 7 +++++-- packages/pl-api/package.json | 2 +- packages/pl-fe/package.json | 2 +- packages/pl-fe/yarn.lock | 8 ++++---- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/packages/pl-api/lib/client.ts b/packages/pl-api/lib/client.ts index 808f2c05a..d5dc19109 100644 --- a/packages/pl-api/lib/client.ts +++ b/packages/pl-api/lib/client.ts @@ -3767,13 +3767,16 @@ class PlApiClient { /** * Mark report as resolved + * * Mark a report as resolved with no further action taken. + * + * @param action_taken_comment Optional admin comment on the action taken in response to this report. Supported by GoToSocial only. * @see {@link https://docs.joinmastodon.org/methods/admin/reports/#resolve} */ - resolveReport: async (reportId: string) => { + resolveReport: async (reportId: string, action_taken_comment?: string) => { let response; if (this.features.mastodonAdmin) { - response = await this.request(`/api/v1/admin/reports/${reportId}/resolve`, { method: 'POST' }); + response = await this.request(`/api/v1/admin/reports/${reportId}/resolve`, { method: 'POST', body: { action_taken_comment } }); } else { response = await this.request(`/api/v1/pleroma/admin/reports/${reportId}`, { method: 'PATCH', diff --git a/packages/pl-api/package.json b/packages/pl-api/package.json index 9a7e909b0..6e135df69 100644 --- a/packages/pl-api/package.json +++ b/packages/pl-api/package.json @@ -1,6 +1,6 @@ { "name": "pl-api", - "version": "1.0.0-rc.26", + "version": "1.0.0-rc.27", "type": "module", "homepage": "https://github.com/mkljczk/pl-fe/tree/develop/packages/pl-api", "repository": { diff --git a/packages/pl-fe/package.json b/packages/pl-fe/package.json index d81cbe374..35f7497c3 100644 --- a/packages/pl-fe/package.json +++ b/packages/pl-fe/package.json @@ -102,7 +102,7 @@ "multiselect-react-dropdown": "^2.0.25", "mutative": "^1.1.0", "path-browserify": "^1.0.1", - "pl-api": "^1.0.0-rc.26", + "pl-api": "^1.0.0-rc.27", "postcss": "^8.4.49", "process": "^0.11.10", "punycode": "^2.1.1", diff --git a/packages/pl-fe/yarn.lock b/packages/pl-fe/yarn.lock index cb773bb86..9c1e67e5c 100644 --- a/packages/pl-fe/yarn.lock +++ b/packages/pl-fe/yarn.lock @@ -7548,10 +7548,10 @@ pkg-dir@^4.1.0: dependencies: find-up "^4.0.0" -pl-api@^1.0.0-rc.26: - version "1.0.0-rc.26" - resolved "https://registry.yarnpkg.com/pl-api/-/pl-api-1.0.0-rc.26.tgz#73f31e6b5804b9fbcd5153052f1efa66b8c35e15" - integrity sha512-8QEN15g/HL+Y1CrxxPDx2ZJe3y11mq27qVn49ABJnFXFXtwnFnf2lWJbcf0ZiRQiIUUC06lV0KZdHZ+OcVZxZg== +pl-api@^1.0.0-rc.27: + version "1.0.0-rc.27" + resolved "https://registry.yarnpkg.com/pl-api/-/pl-api-1.0.0-rc.27.tgz#0d8fb221e6a18be0a81a09c1d19b25e686be3e00" + integrity sha512-BmmdK6JSnj2kLaawalN9C4hymta2hCeWG1zhILJfMhHUxUCFzPlX/PkyjfOZEFLek2EbbRZe/Yd64Z1PovXB0w== dependencies: blurhash "^2.0.5" http-link-header "^1.1.3"