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)}