From 0354eb9828adac43dac2a349662cf7be8d6c97ca Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Fri, 16 Dec 2022 14:11:15 -0800 Subject: [PATCH] Don't add imported reviews to timelines Generally they're so backdated that they don't add, and they put too much load on the instance. --- bookwyrm/activitystreams.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bookwyrm/activitystreams.py b/bookwyrm/activitystreams.py index 1765f7e34..80774e28d 100644 --- a/bookwyrm/activitystreams.py +++ b/bookwyrm/activitystreams.py @@ -318,6 +318,10 @@ def add_status_on_create_command(sender, instance, created): if instance.published_date < timezone.now() - timedelta( days=1 ) or instance.created_date < instance.published_date - timedelta(days=1): + # a backdated status from a local user is an import, don't add it + if instance.user.local: + return + # an out of date remote status is a low priority but should be added priority = LOW add_status_task.apply_async(