summaryrefslogtreecommitdiffstats
path: root/api/views/timelines.py
diff options
context:
space:
mode:
Diffstat (limited to 'api/views/timelines.py')
-rw-r--r--api/views/timelines.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/api/views/timelines.py b/api/views/timelines.py
index 8f4ac78..b14586f 100644
--- a/api/views/timelines.py
+++ b/api/views/timelines.py
@@ -3,6 +3,7 @@ from api import schemas
from api.decorators import identity_required
from api.pagination import MastodonPaginator
from api.views.base import api_router
+from users.models import Identity
@api_router.get("/v1/timelines/home", response=list[schemas.Status])
@@ -52,6 +53,7 @@ def public(
):
queryset = (
Post.objects.public()
+ .filter(author__restriction=Identity.Restriction.none)
.select_related("author")
.prefetch_related("attachments")
.order_by("-created")
@@ -90,6 +92,7 @@ def hashtag(
limit = 40
queryset = (
Post.objects.public()
+ .filter(author__restriction=Identity.Restriction.none)
.tagged_with(hashtag)
.select_related("author")
.prefetch_related("attachments")