From 14d343dcb30e7504b55f2377d51430bb3717cfa9 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 5 Dec 2022 03:21:47 +0200 Subject: [PATCH] dont change titles for chudded ppl posting on /h/chudrama --- files/routes/posts.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/files/routes/posts.py b/files/routes/posts.py index a3fb4d6828..8f6ec32741 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -544,6 +544,9 @@ def submit_post(v:User, sub=None): if not title: return error("Please enter a better title.") + + sub = request.values.get("sub", "").lower().replace('/h/','').strip() + torture = (v.agendaposter and not v.marseyawarded and sub != 'chudrama') title_html = filter_emojis_only(title, graceful=True, count_marseys=True, torture=torture) if v.marseyawarded and not marseyaward_title_regex.fullmatch(title_html): @@ -551,8 +554,6 @@ def submit_post(v:User, sub=None): if len(title_html) > POST_TITLE_HTML_LENGTH_LIMIT: return error("Rendered title is too big!") - sub = request.values.get("sub", "").lower().replace('/h/','').strip() - if sub == 'changelog' and not v.admin_level >= PERMS['POST_TO_CHANGELOG']: # we also allow 'code contributor' badgeholders to post to the changelog hole allowed = g.db.query(Badge.user_id).filter_by(badge_id=3).all()