Make quarentine work with list of tuples instead of strings

This commit is contained in:
Ilja 2020-10-02 14:51:39 +02:00 committed by Haelwenn (lanodan) Monnier
commit 27fe7b0274
No known key found for this signature in database
GPG key ID: D5B7A8E43C997DEE
5 changed files with 18 additions and 5 deletions

View file

@ -100,6 +100,11 @@ defmodule Pleroma.Web.ActivityPub.MRF do
Enum.any?(domains, fn domain -> Regex.match?(domain, host) end)
end
@spec instance_list_from_tuples([{String.t(), String.t()}]) :: [String.t()]
def instance_list_from_tuples(list) do
Enum.map(list, fn {instance, _} -> instance end)
end
def describe(policies) do
{:ok, policy_configs} =
policies