forked from mirrors/bookwyrm
activity feed should handle looged out users
This commit is contained in:
parent
35696934da
commit
cc44331073
1 changed files with 4 additions and 0 deletions
|
@ -208,6 +208,10 @@ def get_activity_feed(
|
|||
# exclude deleted
|
||||
queryset = queryset.exclude(deleted=True).order_by('-published_date')
|
||||
|
||||
# you can't see followers only or direct messages if you're not logged in
|
||||
if user.is_anonymous:
|
||||
privacy = [p for p in privacy if not p in ['followers', 'direct']]
|
||||
|
||||
# filter to only privided privacy levels
|
||||
queryset = queryset.filter(privacy__in=privacy)
|
||||
|
||||
|
|
Loading…
Reference in a new issue