From 5817e96e0a0c2fa75b49e4f4e5c87ecc4fd15f91 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 23 Oct 2021 02:00:55 +0200 Subject: [PATCH] dfsfds --- files/routes/comments.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/files/routes/comments.py b/files/routes/comments.py index 0d32f0e660..a382bbe75f 100755 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -197,15 +197,13 @@ def api_comment(v): Comment.parent_submission == parent_submission, Comment.body == body ).first() - if existing: - return {"error": f"You already made that comment: {existing.permalink}"}, 409 + if existing: return {"error": f"You already made that comment: {existing.permalink}"}, 409 - if parent.author.any_block_exists(v) and not v.admin_level>=3: - return {"error": "You can't reply to users who have blocked you, or users you have blocked."}, 403 + if parent.author.any_block_exists(v) and not v.admin_level>=3: return {"error": "You can't reply to users who have blocked you, or users you have blocked."}, 403 is_bot = request.headers.get("X-User-Type","")=="Bot" - if not is_bot: + if not is_bot and 'trans lives matters' not in body.lower(): now = int(time.time()) cutoff = now - 60 * 60 * 24