This commit is contained in:
Aevann1 2021-09-16 11:56:50 +02:00
parent 05cb0877e6
commit 8ff5117174
3 changed files with 4 additions and 2 deletions

View file

@ -112,6 +112,10 @@ def post_id(pid, anything=None, v=None):
blocked.c.id,
)
shadowbanned = g.db.query(User.id).filter(User.shadowbanned == False).subquery()
comments = comments.filter(Comment.author_id.notin_(shadowbanned))
if not (v and v.shadowbanned) and not (v and v.admin_level == 6):
comments = comments.join(Comment.author).filter(User.shadowbanned == False)