Browse Source

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.
merge-requests/69/head
Deimos 6 years ago
parent
commit
c559529115
  1. 2
      tildes/tildes/templates/macros/comments.jinja2

2
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 %}

Loading…
Cancel
Save