1 defmodule Pleroma.Web.ActivityPub.MRF.HellthreadPolicy do
2 @behaviour Pleroma.Web.ActivityPub.MRF
5 def filter(%{"type" => "Create"} = object) do
6 threshold = Pleroma.Config.get([:mrf_hellthread, :threshold])
7 recipients = (object["to"] || []) ++ (object["cc"] || [])
9 if length(recipients) > threshold do
17 def filter(object), do: {:ok, object}