1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2018 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Web.ActivityPub.MRF.HellthreadPolicy do
6 @behaviour Pleroma.Web.ActivityPub.MRF
9 def filter(%{"type" => "Create"} = object) do
10 threshold = Pleroma.Config.get([:mrf_hellthread, :threshold])
11 recipients = (object["to"] || []) ++ (object["cc"] || [])
13 if length(recipients) > threshold do
21 def filter(object), do: {:ok, object}