forked from MarseyWorld/MarseyWorld
fix this https://rdrama.net/post/18459/marseycapywalking-megathread-for-bugs-and-suggestions/4222635#context
parent
d353f57f21
commit
bf078e2f1a
|
@ -156,6 +156,9 @@ def searchposts(v:User):
|
||||||
|
|
||||||
posts = apply_time_filter(t, posts, Submission)
|
posts = apply_time_filter(t, posts, Submission)
|
||||||
|
|
||||||
|
if not v.can_see_shadowbanned:
|
||||||
|
posts = posts.join(Submission.author).filter(User.shadowbanned == None)
|
||||||
|
|
||||||
total = posts.count()
|
total = posts.count()
|
||||||
|
|
||||||
posts = sort_objects(sort, posts, Submission)
|
posts = sort_objects(sort, posts, Submission)
|
||||||
|
@ -264,6 +267,9 @@ def searchcomments(v:User):
|
||||||
except: abort(400)
|
except: abort(400)
|
||||||
comments = comments.filter(Comment.created_utc < before)
|
comments = comments.filter(Comment.created_utc < before)
|
||||||
|
|
||||||
|
if not v.can_see_shadowbanned:
|
||||||
|
comments = comments.join(Comment.author).filter(User.shadowbanned == None)
|
||||||
|
|
||||||
total = comments.count()
|
total = comments.count()
|
||||||
|
|
||||||
comments = sort_objects(sort, comments, Comment)
|
comments = sort_objects(sort, comments, Comment)
|
||||||
|
@ -353,6 +359,9 @@ def searchmessages(v:User):
|
||||||
|
|
||||||
comments = comments.filter(Comment.sentto == sentto.id)
|
comments = comments.filter(Comment.sentto == sentto.id)
|
||||||
|
|
||||||
|
if not v.can_see_shadowbanned:
|
||||||
|
comments = comments.join(Comment.author).filter(User.shadowbanned == None)
|
||||||
|
|
||||||
total = comments.count()
|
total = comments.count()
|
||||||
|
|
||||||
comments = sort_objects(sort, comments, Comment)
|
comments = sort_objects(sort, comments, Comment)
|
||||||
|
|
Loading…
Reference in New Issue