Fix notification email links to handle user and non-user contexts

This commit is contained in:
2026-03-18 08:16:40 +00:00
parent 9ba8ec8f41
commit f12bc2f35f
4 changed files with 20 additions and 1 deletions

View File

@@ -101,6 +101,9 @@ class NotificationMailer
if (null === $addressee->getEmail()) {
continue;
}
if ($notification->getSender() === $addressee) {
continue;
}
$this->processNotificationForAddressee($notification, $addressee);
}
}

View File

@@ -13,7 +13,12 @@
> {{ line }}
{% endfor %}
{% if dest.isUser %}
[Vous pouvez visualiser la notification et y répondre ici.]({{ absolute_url(path('chill_main_notification_show', {'_locale': dest.locale, 'id': notification.id }, false)) }})
{% else %}
[Vous pouvez visualiser la notification et y répondre ici.]({{ absolute_url(path('chill_main_notification_grant_access_by_access_key', {'_locale': dest.locale, 'id': notification.id, 'accessKey': notification.accessKey }, false)) }})
{% endif %}
-----

View File

@@ -12,7 +12,11 @@ Titre de la notification: {{ notification.title }}
> {{ line|raw }}
{% endfor %}
Vous pouvez visualiser la notification et y répondre ici: {{ absolute_url(path('chill_main_notification_show', {'_locale': dest.locale, 'id': notification.id }, false)) }}.
{% if dest.isUser %}
[Vous pouvez visualiser la notification et y répondre ici.]({{ absolute_url(path('chill_main_notification_show', {'_locale': dest.locale, 'id': notification.id }, false)) }})
{% else %}
[Vous pouvez visualiser la notification et y répondre ici.]({{ absolute_url(path('chill_main_notification_grant_access_by_access_key', {'_locale': dest.locale, 'id': notification.id, 'accessKey': notification.accessKey }, false)) }})
{% endif %}
--
Le logiciel Chill