From b0fdd78d8b929caba56fc150ce4e1269f23d760d Mon Sep 17 00:00:00 2001 From: Aevann Date: Wed, 22 Feb 2023 19:21:16 +0200 Subject: [PATCH] log timestamp in dm_images --- files/helpers/media.py | 4 ++-- files/templates/admin/dm_images.html | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/files/helpers/media.py b/files/helpers/media.py index ad5d6af72..d422aecc1 100644 --- a/files/helpers/media.py +++ b/files/helpers/media.py @@ -268,7 +268,7 @@ def process_dm_images(v, user): if body: with open(f"{LOG_DIRECTORY}/dm_images.log", "a+", encoding="utf-8") as f: if user: - f.write(f'{body.strip()}, {v.username}, {v.id}, {user.username}, {user.id}\n') + f.write(f'{body.strip()}, {v.username}, {v.id}, {user.username}, {user.id}, {int(time.time())}\n') else: - f.write(f'{body.strip()}, {v.username}, {v.id}, Modmail, Modmail\n') + f.write(f'{body.strip()}, {v.username}, {v.id}, Modmail, Modmail, {int(time.time())}\n') return body diff --git a/files/templates/admin/dm_images.html b/files/templates/admin/dm_images.html index 2695639ff..57e34467e 100644 --- a/files/templates/admin/dm_images.html +++ b/files/templates/admin/dm_images.html @@ -9,6 +9,7 @@ Image Sender Sent To + At @@ -39,6 +40,7 @@ {% endif %} {% endif %} + {% endfor %}