Commit 92362e1e authored by Karen Konou's avatar Karen Konou
Browse files

Implement large thread filter

parent 61a88a67
Pipeline #5638 failed with stages
in 6 minutes and 15 seconds
......@@ -163,6 +163,8 @@
allow_followersonly: false,
allow_direct: false
config :pleroma, :mrf_hellthreadmitigation, threshold: 10
config :pleroma, :mrf_simple,
media_removal: [],
media_nsfw: [],
defmodule Pleroma.Web.ActivityPub.MRF.HellthreadPolicy do
@behaviour Pleroma.Web.ActivityPub.MRF
@impl true
def filter(object) do
policy = Pleroma.Config.get(:mrf_hellthreadmitigation)
if (length(object["to"]) + length(object["cc"])) > Keyword.get(policy, :threshold) do
{:reject, nil}
{:ok, object}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment