diff --git a/zmsentities/src/Zmsentities/Helper/Messaging.php b/zmsentities/src/Zmsentities/Helper/Messaging.php index 9040d17df..73a8a2304 100644 --- a/zmsentities/src/Zmsentities/Helper/Messaging.php +++ b/zmsentities/src/Zmsentities/Helper/Messaging.php @@ -196,8 +196,8 @@ public static function getNotificationContent(Process $process, Config $config, protected static function getTemplate($type, $status, ?Process $process = null) { if ($process) { - $provider = $process->getFirstAppointment()->getScope()->getProvider(); - $providerName = $provider->getDisplayName() ?? $provider->getName(); + $provider = $process->scope->provider; + $providerName = $provider->displayName; $providerTemplateName = self::getProviderTemplateName($providerName); $providerTemplate = 'custom/' . $type . '/' . $status . '/' . $providerTemplateName . '.twig';