mirror of
https://git.youjo.love/youjo/youjo-be.git
synced 2025-01-20 11:16:04 +01:00
14 lines
343 B
Elixir
14 lines
343 B
Elixir
defmodule Pleroma.Web.ActivityPub.MRF.HellthreadPolicy do
|
|
@behaviour Pleroma.Web.ActivityPub.MRF
|
|
|
|
@impl true
|
|
def filter(object) do
|
|
policy = Pleroma.Config.get(:mrf_hellthread)
|
|
|
|
if length(object["to"]) + length(object["cc"]) > Keyword.get(policy, :threshold) do
|
|
{:reject, nil}
|
|
else
|
|
{:ok, object}
|
|
end
|
|
end
|
|
end
|