From f5a68a7e7932b8534b905d0b53800a4b9385fb0e Mon Sep 17 00:00:00 2001 From: Aevann Date: Sun, 19 Mar 2023 14:01:54 +0200 Subject: [PATCH] fix 500 errors --- files/routes/chat.py | 2 +- files/routes/comments.py | 2 +- files/routes/posts.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/files/routes/chat.py b/files/routes/chat.py index f066a54a96..dbe04044af 100644 --- a/files/routes/chat.py +++ b/files/routes/chat.py @@ -57,7 +57,7 @@ def speak(data, v): if image: text += f'\n\n{image}' if not text: return '', 400 - text_html = sanitize(text, count_marseys=True, chat=True) + text_html = sanitize(text, count_emojis=True, chat=True) if isinstance(text_html , tuple): return text_html diff --git a/files/routes/comments.py b/files/routes/comments.py index 4f7cb3f88e..cb6ddf40af 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -230,7 +230,7 @@ def comment(v:User): if v.marsify: body_for_sanitize = marsify(body_for_sanitize) torture = (v.agendaposter and not v.marseyawarded and not (posting_to_submission and post_target.sub == 'chudrama') and post_target.id not in ADMIGGER_THREADS) - body_html = sanitize(body_for_sanitize, limit_pings=5, count_marseys=not v.marsify, torture=torture) + body_html = sanitize(body_for_sanitize, limit_pings=5, count_emojis=not v.marsify, torture=torture) if post_target.id not in ADMIGGER_THREADS and '!wordle' not in body.lower() and AGENDAPOSTER_PHRASE not in body.lower(): existing = g.db.query(Comment.id).filter( diff --git a/files/routes/posts.py b/files/routes/posts.py index 4d9e7d33bf..6606dd39dd 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -446,7 +446,7 @@ def submit_post(v:User, sub=None): 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) + title_html = filter_emojis_only(title, graceful=True, count_emojis=True, torture=torture) if v.marseyawarded and not marseyaward_title_regex.fullmatch(title_html): abort(400, "You can only type marseys!") if len(title_html) > POST_TITLE_HTML_LENGTH_LIMIT: @@ -560,7 +560,7 @@ def submit_post(v:User, sub=None): torture = (v.agendaposter and not v.marseyawarded and sub != 'chudrama') - body_html = sanitize(body, count_marseys=True, limit_pings=100, showmore=False, torture=torture) + body_html = sanitize(body, count_emojis=True, limit_pings=100, showmore=False, torture=torture) if v.marseyawarded and marseyaward_body_regex.search(body_html): abort(400, "You can only type marseys!")