From 616837db6d6eaf01aaab6ef9e24d5dd8b28b7441 Mon Sep 17 00:00:00 2001 From: uwaa Date: Tue, 14 Jan 2025 11:58:40 +0000 Subject: [PATCH] pleroma: merge react methods --- Pleroma/Pleroma.cs | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/Pleroma/Pleroma.cs b/Pleroma/Pleroma.cs index 8ee56c4..d5475a1 100644 --- a/Pleroma/Pleroma.cs +++ b/Pleroma/Pleroma.cs @@ -772,22 +772,12 @@ public class Pleroma } /// - /// Adds a unicode reaction to a status. + /// Adds a reaction to a status. /// /// The status to react to. - /// The unicode emoji. + /// The unicode emoji or custom emoji. /// The new state of the status, if it exists. - public Task React(StatusID status, char emoji) => ReactInline(status, emoji.ToString()); - - /// - /// Adds a custom reaction to a status. - /// - /// The status to react to. - /// The custom emoji's name. - /// The new state of the status, if it exists. - public Task React(StatusID status, string emojiName) => ReactInline(status, $":{emojiName}:"); - - Task ReactInline(StatusID status, string emoji) + public Task React(StatusID status, string emoji) { return Retry(() => new HttpRequestMessage(HttpMethod.Put, $"/api/v1/pleroma/statuses/{WebUtility.UrlEncode(status.ID)}/reactions/{WebUtility.UrlEncode(emoji)}")); }