From c559529115331409931a51b609303636331b47f8 Mon Sep 17 00:00:00 2001 From: Deimos Date: Sun, 5 May 2019 17:32:54 -0600 Subject: [PATCH] Don't mark "unviewable" comments by OP with stripe If removed comments were made by the OP, they would still have the stripe even when the viewer wasn't able to see the comment. This fixes that. --- tildes/tildes/templates/macros/comments.jinja2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tildes/tildes/templates/macros/comments.jinja2 b/tildes/tildes/templates/macros/comments.jinja2 index aa18200..3b521e2 100644 --- a/tildes/tildes/templates/macros/comments.jinja2 +++ b/tildes/tildes/templates/macros/comments.jinja2 @@ -270,7 +270,7 @@ {# done as an elif so we never mark a user's own comments as "new" #} {% elif mark_newer_than and comment.created_time > mark_newer_than %} {% do classes.append('is-comment-new') %} - {% elif request.has_permission('view_author', comment.topic) and comment.user == comment.topic.user %} + {% elif request.has_permission('view_author', comment.topic) and request.has_permission("view", comment) and comment.user == comment.topic.user %} {% do classes.append('is-comment-by-op') %} {% endif %}