From 28559e6d3453a7e19e240d8561e0c1c2d5ef21a6 Mon Sep 17 00:00:00 2001 From: Aevann Date: Tue, 26 Sep 2023 23:35:41 +0300 Subject: [PATCH] try fixing /notifications/messages live thing --- files/routes/chat.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/files/routes/chat.py b/files/routes/chat.py index 7a3810c54..82ede39b9 100644 --- a/files/routes/chat.py +++ b/files/routes/chat.py @@ -379,9 +379,9 @@ def messagereply(v): for admin in admin_ids: notif = Notification(comment_id=c.id, user_id=admin) g.db.add(notif) - else: + elif user_id and user_id not in {v.id, MODMAIL_ID} | BOT_IDs: c.unread = True - rendered = render_template("comments.html", v=get_account(top_comment.sentto), comments=[c]) - emit('insert_reply', [parent.id, rendered], namespace='/', to=top_comment.sentto) + rendered = render_template("comments.html", v=get_account(user_id), comments=[c]) + emit('insert_reply', [parent.id, rendered], namespace='/', to=user_id) return {"comment": render_template("comments.html", v=v, comments=[c])}