Fix formatting
authorKaren Konou <konoukaren@gmail.com>
Sat, 22 Dec 2018 22:32:38 +0000 (23:32 +0100)
committerKaren Konou <konoukaren@gmail.com>
Sat, 22 Dec 2018 22:32:38 +0000 (23:32 +0100)
config/config.exs
lib/pleroma/web/activity_pub/mrf/hellthread_policy.ex

index de834e03adede7d65c728936505d2a10b96c1265..5e1006f500932e4fcab517a779d44913cd299421 100644 (file)
@@ -163,7 +163,7 @@ config :pleroma, :mrf_rejectnonpublic,
   allow_followersonly: false,
   allow_direct: false
 
-config :pleroma, :mrf_hellthreadmitigation, threshold: 10  
+config :pleroma, :mrf_hellthreadmitigation, threshold: 10
 
 config :pleroma, :mrf_simple,
   media_removal: [],
index 0e09181263d2039564877301320cf6a7e89c3cb0..edcbc5219eb63865be57690ad428a758d08d8d7a 100644 (file)
@@ -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