From 75255633e0bc543dca74c1b75b4aa6d234bc1232 Mon Sep 17 00:00:00 2001 From: uwaa Date: Mon, 6 Jan 2025 23:58:05 +0000 Subject: [PATCH] pleroma: encode id in ChangeScope --- Pleroma/Pleroma.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Pleroma/Pleroma.cs b/Pleroma/Pleroma.cs index 1585eb7..e47a9a0 100644 --- a/Pleroma/Pleroma.cs +++ b/Pleroma/Pleroma.cs @@ -816,7 +816,7 @@ public class PleromaAdmin : Pleroma })))!; } - public Task ChangeScope(StatusID id, bool? sensitive = null, StatusVisibility? visibility = null) + public Task ChangeScope(StatusID status, bool? sensitive = null, StatusVisibility? visibility = null) { MemoryStream mem = new MemoryStream(); @@ -843,7 +843,7 @@ public class PleromaAdmin : Pleroma return Retry(() => { mem.Position = 0; - HttpRequestMessage req = new HttpRequestMessage(HttpMethod.Put, $"/api/v1/pleroma/admin/statuses/{id}"); + HttpRequestMessage req = new HttpRequestMessage(HttpMethod.Put, $"/api/v1/pleroma/admin/statuses{WebUtility.UrlEncode(status.ID)}"); req.Content = new StreamContent(mem); req.Content.Headers.ContentType = new MediaTypeHeaderValue("application/json"); return req;