give push notifs to mentions on edit

master
Aevann 2023-02-24 04:42:20 +02:00
parent e37031c4dd
commit cb73c7c681
1 changed files with 2 additions and 0 deletions

View File

@ -439,6 +439,8 @@ def edit_comment(cid, v):
if not notif: if not notif:
n = Notification(comment_id=c.id, user_id=x) n = Notification(comment_id=c.id, user_id=x)
g.db.add(n) 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() g.db.commit()
return {"body": c.body, "comment": c.realbody(v)} return {"body": c.body, "comment": c.realbody(v)}