From 733e0e19acc24e0fc2b61b1f92cfd99afb3076c5 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Fri, 11 Dec 2020 17:39:17 -0800 Subject: [PATCH] Don't show boost and original status in timeline Fixes #381 --- bookwyrm/views.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bookwyrm/views.py b/bookwyrm/views.py index ab42557c7..0fdfa1f90 100644 --- a/bookwyrm/views.py +++ b/bookwyrm/views.py @@ -131,7 +131,7 @@ def get_activity_feed(user, filter_level, model=models.Status): activities = model.objects activities = activities.filter( - deleted=False + deleted=False, ).order_by( '-published_date' ) @@ -160,6 +160,11 @@ def get_activity_feed(user, filter_level, model=models.Status): Q(user__in=following, privacy='followers') | Q(privacy='public') ) + try: + activities = activities.filter(~Q(boosters__in=activities)) + except ValueError: + pass + return activities