forked from rDrama/rDrama
1
0
Fork 0

fix snappy dup detection for last quote

master
Aevann 2024-02-12 20:17:01 +02:00
parent c0a5bbc29e
commit 6cf5708f43
1 changed files with 1 additions and 1 deletions

View File

@ -248,7 +248,7 @@ def comment(v):
if v.admin_level >= PERMS['USE_ADMIGGER_THREADS'] and posting_to_post and post_target.id == SNAPPY_THREAD and level == 1:
with open(f"snappy_{SITE_NAME}.txt", "r+") as f:
body_for_checking = '\n[para]\n' + body.lower() + '\n[para]\n'
if body_for_checking in f.read().lower():
if body_for_checking in f.read().lower() + '[para]\n':
abort(400, "Snappy quote already exists!")
f.write('[para]\n' + body + '\n')
SNAPPY_QUOTES.append(body)