Filter on user pages too

This commit is contained in:
Julian Rota 2022-06-22 23:48:45 -04:00 committed by Ben Rog-Wilhelm
parent f736d660b6
commit 4ecb4747c1

View file

@ -938,7 +938,12 @@ def u_username_comments(username, v=None):
comments = g.db.query(Comment.id).filter(Comment.author_id == u.id, Comment.parent_submission != None) comments = g.db.query(Comment.id).filter(Comment.author_id == u.id, Comment.parent_submission != None)
if not v or (v.id != u.id and v.admin_level < 2): if not v or (v.id != u.id and v.admin_level < 2):
comments = comments.filter(Comment.deleted_utc == 0, Comment.is_banned == False, Comment.ghost == False) comments = comments.filter(
Comment.deleted_utc == 0,
Comment.is_banned == False,
Comment.ghost == False,
(Comment.filter_state != 'filtered') & (Comment.filter_state != 'removed')
)
now = int(time.time()) now = int(time.time())
if t == 'hour': if t == 'hour':