Merge pull request #5 from Tipimi-fr/fix/brevo

Tying to fix brevo sms
This commit is contained in:
Slim Amamou 2025-01-16 16:19:54 +01:00 committed by GitHub
commit 377467a50f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

2
.env
View file

@ -109,5 +109,5 @@ STORAGE_SECRET=!ChangeMe!
###< league/flysystem-bundle ### ###< league/flysystem-bundle ###
###> symfony/brevo-notifier ### ###> symfony/brevo-notifier ###
# BREVO_DSN=brevo://API_KEY@default?sender=SENDER BREVO_DSN=brevo://API_KEY@default?sender=SENDER
###< symfony/brevo-notifier ### ###< symfony/brevo-notifier ###

View file

@ -26,7 +26,9 @@ final class SmsNotifier
public function notify(User $user, string $subject): ?SentMessage public function notify(User $user, string $subject): ?SentMessage
{ {
$this->logger->info('SMS Notification');
if (!$user->canBeNotifiedBySms()) { if (!$user->canBeNotifiedBySms()) {
$this->logger->warning('User cannot be notified by SMS');
return null; return null;
} }
@ -54,5 +56,6 @@ final class SmsNotifier
return null; return null;
} }
$this->logger->info('SMS Sent Successfully');
} }
} }