remove duplicate logic

pull/52/head
justcool393 2022-12-08 21:27:12 -06:00
parent db188ec1c9
commit e5f0de6424
1 changed files with 0 additions and 10 deletions

View File

@ -125,16 +125,6 @@ def comment(v:User):
if sub in ('furry','vampire','racist','femboy') and not v.client and not v.house.lower().startswith(sub):
abort(403, f"You need to be a member of House {sub.capitalize()} to comment in /h/{sub}")
if not User.can_see(v, parent): abort(404)
if not isinstance(parent, User) and parent.deleted_utc != 0: abort(404)
if posting_to_submission:
sub = post_target.sub
if sub and v.exiled_from(sub): abort(403, f"You're exiled from /h/{sub}")
if sub in ('furry','vampire','racist','femboy') and not v.client and not v.house.lower().startswith(sub):
abort(403, f"You need to be a member of House {sub.capitalize()} to comment in /h/{sub}")
if level > COMMENT_MAX_DEPTH: abort(400, f"Max comment level is {COMMENT_MAX_DEPTH}")
body = sanitize_raw_body(request.values.get("body", ""), False)