defp check_report_removal(_actor_info, object), do: {:ok, object}
@impl true
- def filter(object) do
- actor_info = URI.parse(object["actor"])
+ def filter(%{"actor" => actor} = object) do
+ actor_info = URI.parse(actor)
with {:ok, object} <- check_accept(actor_info, object),
{:ok, object} <- check_reject(actor_info, object),
_e -> {:reject, nil}
end
end
+
+ def filter(object), do: {:ok, object}
end
end
@impl true
- def filter(object) do
- actor_info = URI.parse(object["actor"])
+ def filter(%{"actor" => actor} = object) do
+ actor_info = URI.parse(actor)
allow_list = Config.get([:mrf_user_allowlist, String.to_atom(actor_info.host)], [])
filter_by_list(object, allow_list)
end
+
+ def filter(object), do: {:ok, object}
end