From 09422ebf2953a7544b074ec7b8dbe15c823440c3 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 11 Sep 2022 11:06:09 +0200 Subject: [PATCH] highlight unread DMs in /notifications/messages --- files/routes/notifications.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/files/routes/notifications.py b/files/routes/notifications.py index 91fd81de4..a6461e5d1 100644 --- a/files/routes/notifications.py +++ b/files/routes/notifications.py @@ -111,6 +111,10 @@ def notifications_messages(v): next_exists = (len(message_threads) > 25) listing = message_threads[:25] + comments_unread = g.db.query(Comment).filter(Comment.id.in_(notifs_unread)) + for c in comments_unread: + c.unread = True + if request.headers.get("Authorization"): return {"data":[x.json for x in listing]} return render_template("notifications.html",