From 67d0b9261ecec6beded673796caf511ad42b19e3 Mon Sep 17 00:00:00 2001 From: Aevann Date: Sat, 9 Mar 2024 07:07:30 +0200 Subject: [PATCH] Revert "remove notification deleting for disjoining notif chains" This reverts commit de7a88e90f4c5427209c2aa7f9223fbdb4ac5fc9. --- files/routes/comments.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/files/routes/comments.py b/files/routes/comments.py index 0c7b59f9e..66e75300b 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -364,6 +364,14 @@ def comment(v): post_target.bump_utc = c.created_utc g.db.add(post_target) + if c.level >= 3 and c.parent_comment.author_id in notify_users: + n = g.db.query(Notification).filter_by( + comment_id=c.parent_comment.parent_comment_id, + user_id=c.parent_comment.author_id, + read=True, + ).one_or_none() + if n: g.db.delete(n) + g.db.flush() if c.parent_post: