Commit 64a39934 authored by William Pitcock's avatar William Pitcock

activitypub: mrf: tag policy: add support for subscription control

parent ff2c28fd
Pipeline #7029 passed with stages
in 3 minutes and 36 seconds
......@@ -85,6 +85,21 @@ defp process_tag(
end
end
defp process_tag(
"mrf_tag:disable-remote-subscription",
%{"type" => "Follow", "actor" => actor} = message
) do
user = User.get_cached_by_ap_id(actor)
if user.local == true do
{:ok, message}
else
{:reject, nil}
end
end
defp process_tag("mrf_tag:disable-any-subscription", %{"type" => "Follow"}), do: {:reject, nil}
defp process_tag(_, message), do: {:ok, message}
def filter_message(actor, message) do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment