show the reply box on deleted posts

master
Aevann 2023-02-18 20:10:44 +02:00
parent 96a85bd140
commit d2c2d313a2
2 changed files with 3 additions and 5 deletions

View File

@ -124,9 +124,9 @@ def comment(v:User):
if not User.can_see(v, parent): abort(403)
if not isinstance(parent, User) and parent.deleted_utc != 0:
if isinstance(parent, Submission):
abort(403, "This post has been deleted!")
abort(403, "You can't reply to deleted posts!")
else:
abort(403, "This comment has been deleted!")
abort(403, "You can't reply to deleted comments!")
if posting_to_submission:
sub = post_target.sub

View File

@ -321,9 +321,7 @@
</div>
</div>
{% if not p.deleted_utc %}
{{macros.comment_reply_box(p.fullname, 'comment-reply-' + p.fullname, subwrapper_css_classes='mb-3', enable_cancel_button=false)}}
{% endif %}
{{macros.comment_reply_box(p.fullname, 'comment-reply-' + p.fullname, subwrapper_css_classes='mb-3', enable_cancel_button=false)}}
{% if comment_info %}
<div class="total mt-1"><a href="{{p.permalink}}">View entire discussion</a></div>