From dfeb3862da2ceaf63db300be1a916f5139250bc2 Mon Sep 17 00:00:00 2001 From: Ilja Date: Fri, 2 Oct 2020 19:08:04 +0200 Subject: [PATCH] config :mrf, :transparency_exclusions works with tumples now --- lib/pleroma/web/activity_pub/mrf/simple_policy.ex | 2 +- test/pleroma/web/node_info_test.exs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pleroma/web/activity_pub/mrf/simple_policy.ex b/lib/pleroma/web/activity_pub/mrf/simple_policy.ex index fe0dc874b..2f26fc3a0 100644 --- a/lib/pleroma/web/activity_pub/mrf/simple_policy.ex +++ b/lib/pleroma/web/activity_pub/mrf/simple_policy.ex @@ -258,7 +258,7 @@ def filter(object), do: {:ok, object} @impl true def describe do - exclusions = Config.get([:mrf, :transparency_exclusions]) + exclusions = Config.get([:mrf, :transparency_exclusions]) |> MRF.instance_list_from_tuples() mrf_simple = Config.get(:mrf_simple) diff --git a/test/pleroma/web/node_info_test.exs b/test/pleroma/web/node_info_test.exs index 7731aadcc..477c44a51 100644 --- a/test/pleroma/web/node_info_test.exs +++ b/test/pleroma/web/node_info_test.exs @@ -170,7 +170,7 @@ test "it shows MRF transparency data if enabled", %{conn: conn} do test "it performs exclusions from MRF transparency data if configured", %{conn: conn} do clear_config([:mrf, :policies], [Pleroma.Web.ActivityPub.MRF.SimplePolicy]) clear_config([:mrf, :transparency], true) - clear_config([:mrf, :transparency_exclusions], ["other.site"]) + clear_config([:mrf, :transparency_exclusions], [{"other.site", "We don't want them to know"}]) simple_config = %{"reject" => [{"example.com", ""}, {"other.site", ""}]} clear_config(:mrf_simple, simple_config)