From 49095ca1bea5c79dc0252c1dc0e3a8202259ecd5 Mon Sep 17 00:00:00 2001 From: Saidi Date: Thu, 27 Jul 2023 08:03:22 +0200 Subject: [PATCH 1/2] update link with abastrct method useful for command context #1481 --- src/Service/Mailer/Mail/Suivi/SuiviNewCommentBackMailer.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Service/Mailer/Mail/Suivi/SuiviNewCommentBackMailer.php b/src/Service/Mailer/Mail/Suivi/SuiviNewCommentBackMailer.php index bf888f151..6fd8833f4 100644 --- a/src/Service/Mailer/Mail/Suivi/SuiviNewCommentBackMailer.php +++ b/src/Service/Mailer/Mail/Suivi/SuiviNewCommentBackMailer.php @@ -32,9 +32,7 @@ public function getMailerParamsFromNotification(NotificationMail $notificationMa return array_merge($notificationMail->getParams(), [ 'ref_signalement' => $signalement->getReference(), - 'link' => $this->urlGenerator->generate('back_signalement_view', [ - 'uuid' => $uuid, - ], UrlGeneratorInterface::ABSOLUTE_URL), + 'link' => $this->generateLink('back_signalement_view', ['uuid' => $uuid]), ]); } From 090f18828f5e8472c92f06aa46c98d8c63c7d0b6 Mon Sep 17 00:00:00 2001 From: Saidi Date: Thu, 27 Jul 2023 10:02:32 +0200 Subject: [PATCH 2/2] use generateLinkSignalementView instead #1481 --- src/Service/Mailer/Mail/Suivi/SuiviNewCommentBackMailer.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Service/Mailer/Mail/Suivi/SuiviNewCommentBackMailer.php b/src/Service/Mailer/Mail/Suivi/SuiviNewCommentBackMailer.php index 6fd8833f4..b6813ee4f 100644 --- a/src/Service/Mailer/Mail/Suivi/SuiviNewCommentBackMailer.php +++ b/src/Service/Mailer/Mail/Suivi/SuiviNewCommentBackMailer.php @@ -28,11 +28,10 @@ public function __construct( public function getMailerParamsFromNotification(NotificationMail $notificationMail): array { $signalement = $notificationMail->getSignalement(); - $uuid = $signalement->getUuid(); return array_merge($notificationMail->getParams(), [ 'ref_signalement' => $signalement->getReference(), - 'link' => $this->generateLink('back_signalement_view', ['uuid' => $uuid]), + 'link' => $this->generateLinkSignalementView($signalement->getUuid()), ]); }