From 62f338da2e7de086f6db95bea32289966a859a39 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 30 Aug 2021 18:59:52 +0200 Subject: [PATCH] gfgf --- files/routes/users.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/files/routes/users.py b/files/routes/users.py index b6439533aa..f5c73e4c1e 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -108,7 +108,9 @@ def messagereply(v, username, id): Comment.sentto == user.id, CommentAux.body == message, ).options(contains_eager(Comment.comment_aux)).first() - if existing: return redirect(f'/notifications?messages=true#comment-{existing.id}') + if existing: + if existing.parent_comment_id: return redirect(f'/notifications?messages=true#comment-{existing.parent_comment_id}') + else: return redirect(f'/notifications?messages=true#comment-{existing.id}') with CustomRenderer() as renderer: text_html = renderer.render(mistletoe.Document(message)) text_html = sanitize(text_html)