master
Aevann1 2021-08-30 18:59:52 +02:00
parent a910f32aa2
commit 62f338da2e
1 changed files with 3 additions and 1 deletions

View File

@ -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)