config :mrf, :transparency_exclusions works with tumples now

This commit is contained in:
Ilja 2020-10-02 19:08:04 +02:00 committed by Haelwenn (lanodan) Monnier
parent e0c7d77197
commit dfeb3862da
No known key found for this signature in database
GPG Key ID: D5B7A8E43C997DEE
2 changed files with 2 additions and 2 deletions

View 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)

View 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)