Skip to content

Commit

Permalink
fix: blyat, i muted myself
Browse files Browse the repository at this point in the history
  • Loading branch information
vas3k committed Nov 12, 2024
1 parent 46644e0 commit e6434b9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions posts/views/feed.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from club import features
from common.feature_flags import feature_switch, noop
from common.pagination import paginate
from posts.helpers import POST_TYPE_ALL, ORDERING_ACTIVITY, ORDERING_NEW, sort_feed
from posts.helpers import POST_TYPE_ALL, ORDERING_ACTIVITY, ORDERING_NEW, sort_feed, ORDERING_HOT
from posts.models.post import Post
from rooms.models import Room, RoomMuted
from users.models.mute import UserMuted
Expand Down Expand Up @@ -41,10 +41,10 @@ def feed(request, post_type=POST_TYPE_ALL, room_slug=None, label_code=None, orde
# hide muted users and rooms
if request.me:
# exclude muted users
posts = posts.exclude(author__muted_from__user_from=request.me)
posts = posts.exclude(author__muted_to__user_from=request.me)

# exclude muted rooms (only if not in the room)
if not room:
if not room and ordering in [ORDERING_NEW, ORDERING_HOT, ORDERING_ACTIVITY]:
posts = posts.exclude(room__muted_users__user=request.me)

# TODO: old code, let's check what works faster
Expand Down

0 comments on commit e6434b9

Please sign in to comment.