-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Notifier] Add Sweego bridge #58322
base: 7.2
Are you sure you want to change the base?
[Notifier] Add Sweego bridge #58322
Conversation
92fdeda
to
2d58734
Compare
src/Symfony/Component/Notifier/Bridge/Sweego/SweegoTransport.php.orig
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Notifier/Bridge/Sweego/Webhook/SweegoRequestParser.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Notifier/Bridge/Sweego/Webhook/SweegoRequestParser.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Notifier/Bridge/Sweego/Webhook/SweegoRequestParser.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Notifier/Exception/UnsupportedSchemeException.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Notifier/Tests/Exception/UnsupportedSchemeExceptionTest.php
Outdated
Show resolved
Hide resolved
2d58734
to
4de21f4
Compare
Hi, I'm working on Sweego project, to answer about this, indeed the from is managed on our side but it's not different for each API Key. An optional sender ID (alphanumeric sender) can be configured on Sweego App and when sending an SMS, the sender ID will be taken as sender; if missing, a short number will be used as sender |
Hi @Wasta-Geek! Thanks for your advice about the Sender ID. Can you help me to implement it? I didn't find how/where to set this Sender ID in your documentation about SMS sending. We are close to finish this PR, let's do it together! |
4de21f4
to
9b92699
Compare
src/Symfony/Component/Notifier/Bridge/Sweego/SweegoTransport.php
Outdated
Show resolved
Hide resolved
Oops, I didn't see your question last time I checked the PR. |
9b92699
to
2ba041b
Compare
|
'Api-Key' => $this->apiKey, | ||
], | ||
'json' => [ | ||
'recipients' => [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After having the PR reviewed with my CTO, we saw that there was some missing optional fields
- bat [boolean]: enable test mode (no sms sent, it's for testing purpose)
- campaign_id [string]: used for tracking / filtering purpose on our platform; identity an SMS campaign and allow to see logs / stats only for this campaign
- shorten_urls [boolean]: True by default, we replaces all url in the SMS content by a shortened url version (reduce the characters of the sms)
- shorten_with_protocol [boolean]: True by default, add scheme to shortened url version
- template_id [UUID4] / variables [Dictionary [ string, string ]] : it could be used in replacement of the message_txt field. (only one of template_id / message_txt accepted). Users can creates templates on our platform that will contains variables placeholders and use the variables field to fill the placeholders with the given variables
Would it be possible to also add those fields ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
templates should not be added here. Using a template is totally different than passing the message text, and does not correspond to a usage of the notifier component (remember that this package is not a SDK for the full Sweego API but a bridge to make it easy to use the Notifier features with Sweego).
bat
probably makes sense as an option in the DSN. The shorten_*
settings might also be exposed in the DSN.
For campaign_id
, I'm not sure what is the best mapping.
This PR folllows
This Bridge brings Webhook support for
sent
event for now. Others will follow in the future.from
parameter is handled on Sweego side (AFAIK, it means onefrom
per API Key. @pydubreucq can you confirm my words?).