From 2adae47b19b4be0b698d716140a4e2e7370fce8c Mon Sep 17 00:00:00 2001 From: Ben Rog-Wilhelm Date: Wed, 9 Aug 2023 02:33:17 -0500 Subject: [PATCH] Stop deleting notifications to private messages after reply. --- files/routes/users.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/files/routes/users.py b/files/routes/users.py index 164273653..8c42348e2 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -524,10 +524,6 @@ def messagereply(v): if not notif: notif = Notification(comment_id=c.id, user_id=user_id) g.db.add(notif) - ids = [c.top_comment.id] + [x.id for x in c.top_comment.replies_ignoring_shadowbans] - notifications = g.db.query(Notification).filter(Notification.comment_id.in_(ids), Notification.user_id == user_id) - for n in notifications: - g.db.delete(n) if PUSHER_ID != 'blahblahblah' and not v.shadowbanned: if len(message) > 500: notifbody = message[:500] + '...' @@ -563,11 +559,6 @@ def messagereply(v): notif = Notification(comment_id=c.id, user_id=admin.id) g.db.add(notif) - ids = [c.top_comment.id] + [x.id for x in c.top_comment.replies_ignoring_shadowbans] - notifications = g.db.query(Notification).filter(Notification.comment_id.in_(ids)) - for n in notifications: - g.db.delete(n) - g.db.commit() return {"comment": render_template("comments.html", v=v, comments=[c], ajax=True)}