diff options
author | Andrew Godwin | 2022-11-25 18:20:59 -0700 |
---|---|---|
committer | Andrew Godwin | 2022-11-25 18:20:59 -0700 |
commit | 5fe5f0495518e43aa4ab9f6831c4bc27a0be9458 (patch) | |
tree | b3c29c33f950743b576140f3dbca3a2e438c256b /activities/views | |
parent | a4c9e85da28d0e76eae2410bf41c328af82373f0 (diff) | |
download | takahe-5fe5f0495518e43aa4ab9f6831c4bc27a0be9458.tar.gz takahe-5fe5f0495518e43aa4ab9f6831c4bc27a0be9458.tar.bz2 takahe-5fe5f0495518e43aa4ab9f6831c4bc27a0be9458.zip |
Exclude replies in most situations from timelines
Diffstat (limited to 'activities/views')
-rw-r--r-- | activities/views/timelines.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/activities/views/timelines.py b/activities/views/timelines.py index 0c5de0e..b680c8a 100644 --- a/activities/views/timelines.py +++ b/activities/views/timelines.py @@ -71,7 +71,11 @@ class Local(ListView): def get_queryset(self): return ( - Post.objects.filter(visibility=Post.Visibilities.public, author__local=True) + Post.objects.filter( + visibility=Post.Visibilities.public, + author__local=True, + in_reply_to__isnull=True, + ) .select_related("author") .prefetch_related("attachments") .order_by("-created")[:50] @@ -97,7 +101,9 @@ class Federated(ListView): def get_queryset(self): return ( - Post.objects.filter(visibility=Post.Visibilities.public) + Post.objects.filter( + visibility=Post.Visibilities.public, in_reply_to__isnull=True + ) .select_related("author") .prefetch_related("attachments") .order_by("-created")[:50] |