From 689be8c94bcfd13c0a2ab4640c70b795cdfce4fb Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Thu, 24 Feb 2022 17:42:28 -0800 Subject: [PATCH] Only scan local data --- bookwyrm/models/antispam.py | 2 ++ bookwyrm/templates/settings/automod/rules.html | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/bookwyrm/models/antispam.py b/bookwyrm/models/antispam.py index b894ade77..f506b6f19 100644 --- a/bookwyrm/models/antispam.py +++ b/bookwyrm/models/antispam.py @@ -93,6 +93,7 @@ def automod_users(reporter): users = User.objects.filter( reduce(operator.or_, (Q(**f) for f in filters)), is_active=True, + local=True, report__isnull=True, # don't flag users that already have reports ).distinct() @@ -127,6 +128,7 @@ def automod_statuses(reporter): statuses = status_model.objects.filter( reduce(operator.or_, (Q(**f) for f in filters)), deleted=False, + local=True, report__isnull=True, # don't flag statuses that already have reports ).distinct() diff --git a/bookwyrm/templates/settings/automod/rules.html b/bookwyrm/templates/settings/automod/rules.html index 5585dfde5..8205b3d71 100644 --- a/bookwyrm/templates/settings/automod/rules.html +++ b/bookwyrm/templates/settings/automod/rules.html @@ -14,7 +14,7 @@

- {% trans "Auto-moderation rules will create reports for any user or status with fields matching the provided string." %} + {% trans "Auto-moderation rules will create reports for any local user or status with fields matching the provided string." %} {% trans "Users or statuses that have already been reported (regardless of whether the report was resolved) will not be flagged." %} {% trans "At this time, reports are not being generated automatically, and you must manually trigger a scan." %}