From 6e3dd62a47715d7c784d6453013a11d43ea7ea66 Mon Sep 17 00:00:00 2001 From: Aevann Date: Mon, 27 Feb 2023 03:56:10 +0200 Subject: [PATCH] fix irrelevant replies in notifs --- files/routes/notifications.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/files/routes/notifications.py b/files/routes/notifications.py index 71c9db9a5..c8bb4e78e 100644 --- a/files/routes/notifications.py +++ b/files/routes/notifications.py @@ -359,7 +359,10 @@ def notifications(v:User): listing2 = [] for x in listing: if x.parent_comment_id: - listing2.append(x.parent_comment) + parent = x.parent_comment + if parent.replies2 == None: + parent.replies2 = [x] + listing2.append(parent) else: listing2.append(x) listing = listing2