From 682c6bf375f24a96f9e63e34c2056bf1e42468c3 Mon Sep 17 00:00:00 2001 From: Slim Amamou Date: Thu, 16 Jan 2025 17:03:22 +0100 Subject: [PATCH] Fixed: was not logging successful sms properly --- src/Notifier/SmsNotifier.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Notifier/SmsNotifier.php b/src/Notifier/SmsNotifier.php index eb0bd89..2cd959b 100644 --- a/src/Notifier/SmsNotifier.php +++ b/src/Notifier/SmsNotifier.php @@ -46,10 +46,13 @@ final class SmsNotifier } try { - return $this->texter->send(new SmsMessage( + $response = $this->texter->send(new SmsMessage( phone: $phoneNumber, subject: $subject )); + $this->logger->info('SMS Sent Successfully'); + + return $response; } catch (\Exception $e) { // OK, the sms cannot be delivered, but this is not critical as the an // email is always sent @@ -57,6 +60,5 @@ final class SmsNotifier return null; } - $this->logger->info('SMS Sent Successfully'); } }