8000 bug #53634 [Notifer][Smsapi] Set messageId of SentMessage (tomasz-kusy) · symfony/symfony@a67e8bd · GitHub
[go: up one dir, main page]

Skip to content

Commit a67e8bd

Browse files
bug #53634 [Notifer][Smsapi] Set messageId of SentMessage (tomasz-kusy)
This PR was squashed before being merged into the 5.4 branch. Discussion ---------- [Notifer][Smsapi] Set messageId of SentMessage | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | License | MIT This commit fixes a bug causing the messageId to never be set in the object. SmsApi always returns it. Commits ------- c97ead7 [Notifer][Smsapi] Set messageId of SentMessage
2 parents 8c0ac47 + c97ead7 commit a67e8bd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Symfony/Component/Notifier/Bridge/Smsapi/SmsapiTransport.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ protected function doSend(MessageInterface $message): SentMessage
8484
throw new TransportException(sprintf('Unable to send the SMS: "%s".', $content['message'] ?? 'unknown error'), $response);
8585
}
8686

87-
return new SentMessage($message, (string) $this);
87+
$sentMessage = new SentMessage($message, (string) $this);
88+
$sentMessage->setMessageId($content['list'][0]['id'] ?? '');
89+
90+
return $sentMessage;
8891
}
8992
}

0 commit comments

Comments
 (0)
0