remove duplicate logic
parent
db188ec1c9
commit
e5f0de6424
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue