made toggleable, added docs

This commit is contained in:
Karen Konou 2019-02-03 20:27:28 +01:00
commit 10130fa7d6
2 changed files with 4 additions and 3 deletions

View file

@ -13,10 +13,10 @@ defmodule Pleroma.Web.ActivityPub.MRF.HellthreadPolicy do
recipients = (object["to"] || []) ++ (object["cc"] || [])
cond do
length(recipients) > reject_threshold ->
length(recipients) > reject_threshold and reject_threshold != 0 ->
{:reject, nil}
length(recipients) > delist_threshold ->
length(recipients) > delist_threshold and delist_threshold != 0 ->
if Enum.member?(object["to"], "https://www.w3.org/ns/activitystreams#Public") or
Enum.member?(object["cc"], "https://www.w3.org/ns/activitystreams#Public") do
object