Skip to content

Commit

Permalink
Added correct file for the comment visibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
thisismeonmounteverest committed Nov 4, 2023
1 parent 5ec1553 commit 9619b45
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion templates/profile/comments.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
<div class="u-w-full u-mb-8">{{ 'commentguidlineslink'|trans|raw }}</div>
{% endif %}
{% for comment in comments %}
{% include 'profile/comment.html.twig' with { comment: comment } %}
{% set commentToVisible = (comment['to'] is defined) ? (comment['to'].showCondition(app.user) > 0) : false %}
{% set commentFromVisible = (comment['from'] is defined) ? (comment['from'].showCondition(app.user) > 0) : false %}
{% if commentToVisible or commentFromVisible %}
{% include 'profile/comment.html.twig' with { comment: comment } %}
{% endif %}
{% else %}
{{ 'profile.no.comments'|trans }}
{% endfor %}
Expand Down

0 comments on commit 9619b45

Please sign in to comment.