Fix formatting

Cette révision appartient à :
Karen Konou 2018-12-22 23:32:38 +01:00
Parent 92362e1e22
révision 409ff60bf8
2 fichiers modifiés avec 3 ajouts et 4 suppressions

Voir le fichier

@ -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: [],

Voir le fichier

@ -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
end