config :mrf, :transparency_exclusions works with tumples now
authorIlja <domainepublic@spectraltheorem.be>
Fri, 2 Oct 2020 17:08:04 +0000 (19:08 +0200)
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>
Fri, 6 Aug 2021 05:59:52 +0000 (07:59 +0200)
lib/pleroma/web/activity_pub/mrf/simple_policy.ex
test/pleroma/web/node_info_test.exs

index fe0dc874bfbf4092c6a4eee93ba2d9f93b928f10..2f26fc3a01104373f9d4c08d33cfcfba8446d693 100644 (file)
@@ -258,7 +258,7 @@ defmodule Pleroma.Web.ActivityPub.MRF.SimplePolicy do
 
   @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)
index 7731aadcc756a8208829709b6ba19abb6b57ffc9..477c44a518d60e822c7df84cbb598f6a90384ba0 100644 (file)
@@ -170,7 +170,7 @@ defmodule Pleroma.Web.NodeInfoTest 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)