From b623cb5fc635a1b58a37f28e1b3477045f86ef35 Mon Sep 17 00:00:00 2001 From: uwaa Date: Wed, 25 Dec 2024 23:09:07 +0000 Subject: [PATCH] pleroma: fix exclude_visibilities --- Pleroma/Pleroma.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Pleroma/Pleroma.cs b/Pleroma/Pleroma.cs index 7afca23..4bdb275 100644 --- a/Pleroma/Pleroma.cs +++ b/Pleroma/Pleroma.cs @@ -441,7 +441,6 @@ public class Pleroma /// Show only statuses from the given domain /// Show only statuses with media attached? /// Include activities by muted users - /// Exclude the statuses with the given visibilities /// Filter replies. /// Return items older than this ID /// Return the oldest items newer than this ID @@ -454,7 +453,6 @@ public class Pleroma string? instance = null, bool only_media = false, bool with_muted = false, - StatusVisibility[]? exclude_visibilities = null, ReplyVisibility reply_visibility = ReplyVisibility.All, string? max_id = null, string? min_id = null, @@ -493,7 +491,6 @@ public class Pleroma if (only_media) addPair("only_media", "true"); if (remote) addPair("remote", "true"); if (with_muted) addPair("with_muted", "true"); - if (exclude_visibilities != null) addPair("exclude_visibilities", JsonSerializer.Serialize(exclude_visibilities)); if (reply_visibility != ReplyVisibility.All) addPair("reply_visibility", reply_visibility.ToString().ToLowerInvariant()); if (max_id != null) addPair("max_id", max_id); if (min_id != null) addPair("min_id", min_id); @@ -543,7 +540,9 @@ public class Pleroma if (with_muted) addPair("with_muted", "true"); if (exclude_reblogs) addPair("exclude_reblogs", "true"); if (exclude_replies) addPair("exclude_replies", "true"); - if (exclude_visibilities != null) addPair("exclude_visibilities", JsonSerializer.Serialize(exclude_visibilities)); + if (exclude_visibilities != null) + foreach (StatusVisibility visibility in exclude_visibilities) + addPair("exclude_visibilities[]", visibility.ToString().ToLowerInvariant()); if (max_id != null) addPair("max_id", max_id); if (min_id != null) addPair("min_id", min_id); if (since_id != null) addPair("since_id", since_id);