1 defmodule Pleroma.Web.ActivityPub.MRF.UserAllowListPolicy do
4 @behaviour Pleroma.Web.ActivityPub.MRF
6 defp filter_by_list(object, []), do: {:ok, object}
8 defp filter_by_list(%{"actor" => actor} = object, allow_list) do
9 if actor in allow_list do
18 actor_info = URI.parse(object["actor"])
19 allow_list = Config.get([:mrf_user_allowlist, String.to_atom(actor_info.host)], [])
21 filter_by_list(object, allow_list)