forked from mirrors/akkoma
Fix formatting
This commit is contained in:
parent
92362e1e22
commit
409ff60bf8
|
@ -163,7 +163,7 @@
|
||||||
allow_followersonly: false,
|
allow_followersonly: false,
|
||||||
allow_direct: false
|
allow_direct: false
|
||||||
|
|
||||||
config :pleroma, :mrf_hellthreadmitigation, threshold: 10
|
config :pleroma, :mrf_hellthreadmitigation, threshold: 10
|
||||||
|
|
||||||
config :pleroma, :mrf_simple,
|
config :pleroma, :mrf_simple,
|
||||||
media_removal: [],
|
media_removal: [],
|
||||||
|
|
|
@ -3,13 +3,12 @@ defmodule Pleroma.Web.ActivityPub.MRF.HellthreadPolicy do
|
||||||
|
|
||||||
@impl true
|
@impl true
|
||||||
def filter(object) do
|
def filter(object) do
|
||||||
|
|
||||||
policy = Pleroma.Config.get(:mrf_hellthreadmitigation)
|
policy = Pleroma.Config.get(:mrf_hellthreadmitigation)
|
||||||
|
|
||||||
if (length(object["to"]) + length(object["cc"])) > Keyword.get(policy, :threshold) do
|
if length(object["to"]) + length(object["cc"]) > Keyword.get(policy, :threshold) do
|
||||||
{:reject, nil}
|
{:reject, nil}
|
||||||
else
|
else
|
||||||
{:ok, object}
|
{:ok, object}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue