This commit is contained in:
Aevann1 2021-12-05 20:52:03 +02:00
parent f30c9c3ce5
commit 0e03dbe9ff
2 changed files with 20 additions and 11 deletions

View file

@ -216,7 +216,7 @@ def get_comment(i, v=None, graceful=False):
return comment
def get_comments(cids, v=None, load_parent=False):
def get_comments(cids, v=None, load_parent=False, shadowbanned=False):
if not cids: return []
@ -235,8 +235,8 @@ def get_comments(cids, v=None, load_parent=False):
blocking.c.id,
blocked.c.id,
).filter(Comment.id.in_(cids))
if not (v and v.shadowbanned) and not (v and v.admin_level > 1):
if not shadowbanned and not v.shadowbanned and v.admin_level < 2:
comments = comments.join(User, User.id == Comment.author_id).filter(User.shadowbanned == None)
comments = comments.join(