Skip to content

Commit

Permalink
bug #53634 [Notifer][Smsapi] Set messageId of SentMessage (tomasz-kusy)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
nicolas-grekas committed Jan 29, 2024
2 parents 8c0ac47 + c97ead7 commit a67e8bd
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -84,6 +84,9 @@ protected function doSend(MessageInterface $message): SentMessage
throw new TransportException(sprintf('Unable to send the SMS: "%s".', $content['message'] ?? 'unknown error'), $response);
}

return new SentMessage($message, (string) $this);
$sentMessage = new SentMessage($message, (string) $this);
$sentMessage->setMessageId($content['list'][0]['id'] ?? '');

return $sentMessage;
}
}

0 comments on commit a67e8bd

Please sign in to comment.