try fixing /notifications/messages live thing

master
Aevann 2023-09-26 23:35:41 +03:00
parent 38170e7e49
commit 28559e6d34
1 changed files with 3 additions and 3 deletions

View File

@ -379,9 +379,9 @@ def messagereply(v):
for admin in admin_ids: for admin in admin_ids:
notif = Notification(comment_id=c.id, user_id=admin) notif = Notification(comment_id=c.id, user_id=admin)
g.db.add(notif) g.db.add(notif)
else: elif user_id and user_id not in {v.id, MODMAIL_ID} | BOT_IDs:
c.unread = True c.unread = True
rendered = render_template("comments.html", v=get_account(top_comment.sentto), comments=[c]) rendered = render_template("comments.html", v=get_account(user_id), comments=[c])
emit('insert_reply', [parent.id, rendered], namespace='/', to=top_comment.sentto) emit('insert_reply', [parent.id, rendered], namespace='/', to=user_id)
return {"comment": render_template("comments.html", v=v, comments=[c])} return {"comment": render_template("comments.html", v=v, comments=[c])}