From cb73c7c681cdc205d18009ec18110b10af5fdfea Mon Sep 17 00:00:00 2001 From: Aevann Date: Fri, 24 Feb 2023 04:42:20 +0200 Subject: [PATCH] give push notifs to mentions on edit --- files/routes/comments.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/files/routes/comments.py b/files/routes/comments.py index 1b914c320..4a0646085 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -439,6 +439,8 @@ def edit_comment(cid, v): if not notif: n = Notification(comment_id=c.id, user_id=x) g.db.add(n) + if not v.shadowbanned: + push_notif({x}, f'New mention by @{v.username}', c.body, (c.id,bool(c.wall_user_id))) g.db.commit() return {"body": c.body, "comment": c.realbody(v)}