projects
/
akkoma
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
0e09181263d2039564877301320cf6a7e89c3cb0
[akkoma]
/
lib
/
pleroma
/
web
/
activity_pub
/
mrf
/
hellthread_policy.ex
1
defmodule Pleroma.Web.ActivityPub.MRF.HellthreadPolicy do
2
@behaviour Pleroma.Web.ActivityPub.MRF
3
4
@impl true
5
def filter(object) do
6
7
policy = Pleroma.Config.get(:mrf_hellthreadmitigation)
8
9
if (length(object["to"]) + length(object["cc"])) > Keyword.get(policy, :threshold) do
10
{:reject, nil}
11
else
12
{:ok, object}
13
end
14
end
15
end