diff --git a/files/routes/comments.py b/files/routes/comments.py index 317d3f3fa8..ea05cb8e49 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -121,7 +121,11 @@ def comment(v:User): posting_to_submission = isinstance(post_target, Submission) if not User.can_see(v, parent): abort(404) - if not isinstance(parent, User) and parent.deleted_utc != 0: abort(404) + if not isinstance(parent, User) and parent.deleted_utc != 0: + if isinstance(parent, Submission): + abort(403, "This post has been deleted!") + else: + abort(403, "This comment has been deleted!") if posting_to_submission: sub = post_target.sub