[TEMPLATES] For note complementary info, compare identity by the ID, rather than nickname, which is not unique

This commit is contained in:
Hugo Sales 2022-03-01 17:39:14 +00:00
parent 5600218924
commit 87354c06bf
No known key found for this signature in database
GPG Key ID: 7D0C7EAFC9D835A0

View File

@ -132,7 +132,7 @@
{% if complementary_info['action'] is defined and not null %} {% if complementary_info['action'] is defined and not null %}
<span> <span>
{% for complementary_info_actor in complementary_info['actors'] %} {% for complementary_info_actor in complementary_info['actors'] %}
{% if complementary_info_actor is defined and (app.user is null or complementary_info_actor.getNickname() != app.user.nickname) %} {% if complementary_info_actor is defined and (app.user is null or complementary_info_actor.getId() != app.user.getId()) %}
{% set tmp %}<a href="{{ complementary_info_actor.getUrl() }}">{{ complementary_info_actor.getNickname() }}</a>{% endset %} {% set tmp %}<a href="{{ complementary_info_actor.getUrl() }}">{{ complementary_info_actor.getNickname() }}</a>{% endset %}
{% set formatted = formatted|merge([tmp]) %} {% set formatted = formatted|merge([tmp]) %}
{% endif %} {% endif %}