From 0da34bf23cb2fcb2a146872913b5ab1dc9b02fa1 Mon Sep 17 00:00:00 2001 From: Aevann Date: Sat, 21 Jan 2023 05:08:05 +0200 Subject: [PATCH] check for existing snappy quotes --- files/routes/comments.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/routes/comments.py b/files/routes/comments.py index 9973ea31f..7e04a9660 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -205,7 +205,7 @@ def comment(v:User): body = body.strip()[:COMMENT_BODY_LENGTH_LIMIT] - if v.admin_level >= PERMS['SITE_SETTINGS_SNAPPY_QUOTES'] and posting_to_submission and post_target.id == SNAPPY_THREAD and level == 1: + if v.admin_level >= PERMS['SITE_SETTINGS_SNAPPY_QUOTES'] and posting_to_submission and post_target.id == SNAPPY_THREAD and level == 1 and body not in SNAPPY_QUOTES: with open(f"snappy_{SITE_NAME}.txt", "a", encoding="utf-8") as f: f.write('\n{[para]}\n' + body)