mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-23 08:03:49 +00:00
Handle missing message IDs in SentMessageEventSubscriber
Added a condition to log an info message when the sent SMS lacks a message ID. Ensures clearer distinction between successful and incomplete SMS message logging.
This commit is contained in:
@@ -32,6 +32,10 @@ final readonly class SentMessageEventSubscriber implements EventSubscriberInterf
|
||||
{
|
||||
$message = $event->getMessage();
|
||||
|
||||
$this->logger->warning('[sms] a sms was sent', ['validReceiversI' => $message->getOriginalMessage()->getRecipientId(), 'idsI' => $message->getMessageId()]);
|
||||
if (null === $message->getMessageId()) {
|
||||
$this->logger->info('[sms] a sms message did not had any id after sending.', ['validReceiversI' => $message->getOriginalMessage()->getRecipientId()]);
|
||||
} else {
|
||||
$this->logger->warning('[sms] a sms was sent', ['validReceiversI' => $message->getOriginalMessage()->getRecipientId(), 'idsI' => $message->getMessageId()]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user