From d7bc4d2159156b47e9b681cf94f33211ef3b95e1 Mon Sep 17 00:00:00 2001 From: Aevann Date: Fri, 15 Nov 2024 21:08:38 +0200 Subject: [PATCH] move blackjack --- files/routes/posts.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/files/routes/posts.py b/files/routes/posts.py index a8e494bce..b1cd6b639 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -1168,9 +1168,6 @@ def edit_post(pid, v): p.body = body - for text in [p.body, p.title, p.url]: - if execute_blackjack(v, p, text, 'post'): break - if len(body_html) > POST_BODY_HTML_LENGTH_LIMIT: stop(400, "Rendered post body is too long!") @@ -1232,6 +1229,8 @@ def edit_post(pid, v): if not p.draft and not complies_with_chud(p): stop(403, f'You have to include "{p.author.chud_phrase}" in your post!') + for text in [p.body, p.title, p.url]: + if execute_blackjack(v, p, text, 'post'): break if v.id == p.author_id: if not p.draft and int(time.time()) - p.created_utc > 60 * 3: