From 409ff60bf87d40919ec8cfcbe054cb66b87ca972 Mon Sep 17 00:00:00 2001 From: Karen Konou Date: Sat, 22 Dec 2018 23:32:38 +0100 Subject: [PATCH] Fix formatting --- config/config.exs | 2 +- lib/pleroma/web/activity_pub/mrf/hellthread_policy.ex | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/config/config.exs b/config/config.exs index de834e03a..5e1006f50 100644 --- a/config/config.exs +++ b/config/config.exs @@ -163,7 +163,7 @@ allow_followersonly: false, allow_direct: false -config :pleroma, :mrf_hellthreadmitigation, threshold: 10 +config :pleroma, :mrf_hellthreadmitigation, threshold: 10 config :pleroma, :mrf_simple, media_removal: [], diff --git a/lib/pleroma/web/activity_pub/mrf/hellthread_policy.ex b/lib/pleroma/web/activity_pub/mrf/hellthread_policy.ex index 0e0918126..edcbc5219 100644 --- a/lib/pleroma/web/activity_pub/mrf/hellthread_policy.ex +++ b/lib/pleroma/web/activity_pub/mrf/hellthread_policy.ex @@ -3,13 +3,12 @@ defmodule Pleroma.Web.ActivityPub.MRF.HellthreadPolicy do @impl true def filter(object) do - 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} else {:ok, object} end end -end \ No newline at end of file +end