summaryrefslogtreecommitdiffstats
path: root/activities/views
diff options
context:
space:
mode:
authorAndrew Godwin2022-11-25 18:20:59 -0700
committerAndrew Godwin2022-11-25 18:20:59 -0700
commit5fe5f0495518e43aa4ab9f6831c4bc27a0be9458 (patch)
treeb3c29c33f950743b576140f3dbca3a2e438c256b /activities/views
parenta4c9e85da28d0e76eae2410bf41c328af82373f0 (diff)
downloadtakahe-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.py10
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]