diff --git a/src/Symfony/Component/Notifier/Bridge/Infobip/InfobipTransport.php b/src/Symfony/Component/Notifier/Bridge/Infobip/InfobipTransport.php index a480aabc6e43b..cbeae8b57413f 100644 --- a/src/Symfony/Component/Notifier/Bridge/Infobip/InfobipTransport.php +++ b/src/Symfony/Component/Notifier/Bridge/Infobip/InfobipTransport.php @@ -86,4 +86,9 @@ protected function doSend(MessageInterface $message): SentMessage return new SentMessage($message, (string) $this); } + + protected function getEndpoint(): ?string + { + return $this->host.($this->port ? ':'.$this->port : ''); + } } diff --git a/src/Symfony/Component/Notifier/Bridge/Infobip/README.md b/src/Symfony/Component/Notifier/Bridge/Infobip/README.md index 841b659d5fc33..915f9817e01d4 100644 --- a/src/Symfony/Component/Notifier/Bridge/Infobip/README.md +++ b/src/Symfony/Component/Notifier/Bridge/Infobip/README.md @@ -1,18 +1,18 @@ Infobip Notifier ================ -Provides Infobip integration for Symfony Notifier. +Provides [Infobip](https://infobip.com) integration for Symfony Notifier. DSN example ----------- ``` -INFOBIP_DSN=infobip://AUTH_TOKEN@INFOBIP_HOST?from=FROM +INFOBIP_DSN=infobip://AUTH_TOKEN@HOST?from=FROM ``` where: - `AUTH_TOKEN` is your Infobip auth token - - `INFOBIP_HOST` is your Infobip host + - `HOST` is your Infobip host - `FROM` is the sender Resources diff --git a/src/Symfony/Component/Notifier/Bridge/Mattermost/MattermostTransport.php b/src/Symfony/Component/Notifier/Bridge/Mattermost/MattermostTransport.php index 903f067f43d7c..6845b0186104f 100644 --- a/src/Symfony/Component/Notifier/Bridge/Mattermost/MattermostTransport.php +++ b/src/Symfony/Component/Notifier/Bridge/Mattermost/MattermostTransport.php @@ -78,9 +78,14 @@ protected function doSend(MessageInterface $message): SentMessage $success = $response->toArray(false); - $sentMessage = new SentMessage($sentMessage, (string) $this); + $sentMessage = new SentMessage($message, (string) $this); $sentMessage->setMessageId($success['id']); return $sentMessage; } + + protected function getEndpoint(): ?string + { + return $this->host.($this->port ? ':'.$this->port : ''); + } } diff --git a/src/Symfony/Component/Notifier/Bridge/Zulip/README.md b/src/Symfony/Component/Notifier/Bridge/Zulip/README.md index a81a4154a56a0..71c3db76c99ae 100644 --- a/src/Symfony/Component/Notifier/Bridge/Zulip/README.md +++ b/src/Symfony/Component/Notifier/Bridge/Zulip/README.md @@ -7,12 +7,13 @@ DSN example ----------- ``` -ZULIP_DSN=zulip://EMAIL:TOKEN@default?channel=CHANNEL +ZULIP_DSN=zulip://EMAIL:TOKEN@HOST?channel=CHANNEL ``` where: - `EMAIL` is your Zulip email - `TOKEN` is your Zulip token + - `HOST` is your Zulip host - `CHANNEL` is the channel Resources diff --git a/src/Symfony/Component/Notifier/Bridge/Zulip/ZulipTransport.php b/src/Symfony/Component/Notifier/Bridge/Zulip/ZulipTransport.php index 297676202c2ae..9e1315485edc2 100644 --- a/src/Symfony/Component/Notifier/Bridge/Zulip/ZulipTransport.php +++ b/src/Symfony/Component/Notifier/Bridge/Zulip/ZulipTransport.php @@ -63,8 +63,6 @@ protected function doSend(MessageInterface $message): SentMessage throw new LogicException(sprintf('The "%s" transport only supports instances of "%s" for options.', __CLASS__, ZulipOptions::class)); } - $endpoint = sprintf('https://%s/api/v1/messages', $this->getEndpoint()); - $options = ($opts = $message->getOptions()) ? $opts->toArray() : []; $options['content'] = $message->getSubject(); @@ -80,6 +78,8 @@ protected function doSend(MessageInterface $message): SentMessage $options['to'] = $message->getRecipientId(); } + $endpoint = sprintf('https://%s/api/v1/messages', $this->getEndpoint()); + $response = $this->client->request('POST', $endpoint, [ 'auth_basic' => $this->email.':'.$this->token, 'body' => $options, pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy