only log edits after 3 minutes have passed

pull/225/head
Aevann 2024-03-08 00:59:07 +02:00
parent 18ba6becd3
commit a0fcd6f6ef
2 changed files with 16 additions and 14 deletions

View File

@ -637,6 +637,7 @@ def edit_comment(cid, v):
if c.author.hieroglyphs and marseyaward_body_regex.search(body_html):
abort(403, "You can only type marseys!")
if int(time.time()) - c.created_utc > 60 * 3:
edit_log = CommentEdit(
comment_id=c.id,
old_body=c.body,

View File

@ -1057,6 +1057,7 @@ def edit_post(pid, v):
changed = False
if int(time.time()) - p.created_utc > 60 * 3:
edit_log = PostEdit(
post_id=p.id,
old_title=p.title,