From fa56e8cb80720f0491c8bc499c07fdfb103e3815 Mon Sep 17 00:00:00 2001 From: uwaa Date: Mon, 16 Dec 2024 03:54:10 +0000 Subject: [PATCH] pleroma: nitpicks --- Pleroma/Pleroma.cs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Pleroma/Pleroma.cs b/Pleroma/Pleroma.cs index 669c167..0f41f16 100644 --- a/Pleroma/Pleroma.cs +++ b/Pleroma/Pleroma.cs @@ -35,21 +35,16 @@ public class Pleroma } - /// - /// The user agent string. - /// - public string UserAgent = "Uwaa.Pleroma/0.0"; - public HttpClient HttpClient; - public Pleroma(string host, string? authorization) + public Pleroma(string host, string? authorization, string? userAgent = "Uwaa.Pleroma/0.0") { UriBuilder builder = new UriBuilder(); builder.Scheme = "https"; builder.Host = host; HttpClient = new HttpClient(); - HttpClient.DefaultRequestHeaders.Add("User-agent", UserAgent); + HttpClient.DefaultRequestHeaders.Add("User-agent", userAgent); HttpClient.BaseAddress = builder.Uri; HttpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); if (authorization != null) @@ -249,6 +244,7 @@ public class Pleroma /// public Task Delete(string status_id) { + //TODO: Test return Retry(new HttpRequestMessage(HttpMethod.Delete, $"/api/v1/statuses/{status_id}")); }