From 3c321b908e9cd4e4848d636ab57c7083665a84b2 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 28 Jan 2022 04:58:17 +0200 Subject: [PATCH] fd --- files/routes/posts.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/files/routes/posts.py b/files/routes/posts.py index 0302c3dde..14aa06bdd 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -876,6 +876,10 @@ def submit_post(v): if request.headers.get("Authorization") or request.headers.get("xhr"): return {"error": "Image/Video files only"}, 400 return render_template("submit.html", v=v, error=f"Image/Video files only."), 400 + if '#fortune' in body: + body = body.replace('#fortune', '') + body += '\n\n

' + random.choice(FORTUNE_REPLIES) + '

' + body_html = sanitize(body) if v.marseyawarded and len(list(re.finditer('>[^<\s+]|[^>\s+]<', body_html, flags=re.A))): return {"error":"You can only type marseys!"}, 400