aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Konou <konoukaren@gmail.com>2019-02-03 20:27:28 +0100
committerKaren Konou <konoukaren@gmail.com>2019-02-03 20:27:28 +0100
commit10130fa7d6a2dca4250ada1144fcfcfe75c26f45 (patch)
tree75d8492a9c4e32fa03fc97548205860849abb990
parent0ef0ae35abf7c1f1016175bd446436f9e5dd8fc2 (diff)
downloadpleroma-10130fa7d6a2dca4250ada1144fcfcfe75c26f45.tar.gz
made toggleable, added docs
-rw-r--r--docs/config.md3
-rw-r--r--lib/pleroma/web/activity_pub/mrf/hellthread_policy.ex4
2 files changed, 4 insertions, 3 deletions
diff --git a/docs/config.md b/docs/config.md
index c14746d93..a1fd8e3f4 100644
--- a/docs/config.md
+++ b/docs/config.md
@@ -148,7 +148,8 @@ This section is used to configure Pleroma-FE, unless ``:managed_config`` in ``:i
* `allow_direct`: whether to allow direct messages
## :mrf_hellthread
-* `threshold`: Number of mentioned users after which the message gets discarded as spam
+* `delist_threshold`: Number of mentioned users after which the message gets delisted. Set to 0 to disable.
+* `reject_threshold`: Number of mentioned users after which the messaged gets rejected. Set to 0 to disable.
## :media_proxy
* `enabled`: Enables proxying of remote media to the instance’s proxy
diff --git a/lib/pleroma/web/activity_pub/mrf/hellthread_policy.ex b/lib/pleroma/web/activity_pub/mrf/hellthread_policy.ex
index 0b9caeb11..53588b264 100644
--- a/lib/pleroma/web/activity_pub/mrf/hellthread_policy.ex
+++ b/lib/pleroma/web/activity_pub/mrf/hellthread_policy.ex
@@ -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