Skip to content

[Notifier] smsapi-notifier fast option to sending message with the highest priority #45139

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

Closed

Conversation

marphi
Copy link
Contributor

@marphi marphi commented Jan 23, 2022

Q A
Branch? 6.1
Bug fix? no
New feature? yes
Deprecations? no
Tickets ---
License MIT
Doc PR ---

I have used custom solution to send sms via smsapi for many years. Time to rewrite it to notifier component. Found 2 issues from my point of view:

  1. THIS part is splitted into separate PR [Notifier] Use the UTF-8 encoding in smsapi-notifier #45174. Encoding. Currently smsapi-notifier does not specify encoding in payload request to provider api which generates such errors.
    image
    (sms message with invalid encoding)
    api.smsapi.pl use windows-1250 as a default value. I propose to set explicitly utf-8.
    After changes:

    image

  2. I'm using smsapi to sending auth codes to my clients. In this case is really important to send SMS as fast as possible, fast options allow me to do this otherwise messages might have some delays.

@marphi marphi requested a review from OskarStark as a code owner January 23, 2022 21:12
@carsonbot carsonbot added this to the 5.4 milestone Jan 23, 2022
@marphi marphi changed the base branch from 5.4 to 5.3 January 23, 2022 21:12
Copy link
Contributor

@OskarStark OskarStark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a changelog to the transport changelog file, thanks

Copy link
Contributor

@OskarStark OskarStark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this is a new feature it must target 6.1 branch

@stof
Copy link
Member

stof commented Jan 25, 2022

For the encoding one being considered as windows-1250 by default in the API, I would treat it as a bugfix, given that Symfony assumes UTF-8 by default in most places.

@OskarStark
Copy link
Contributor

OskarStark commented Jan 25, 2022

For the encoding one being considered as windows-1250 by default in the API, I would treat it as a bugfix, given that Symfony assumes UTF-8 by default in most places.

You are right, but in this case this PR should be slit into two PRs 🤷‍♂️

@OskarStark OskarStark modified the milestones: 5.4, 5.3 Jan 25, 2022
@stof
Copy link
Member

stof commented Jan 25, 2022

@OskarStark indeed

```

where:
- `TOKEN` is your API Token (OAuth)
- `FROM` is the sender name
- `FAST` setting this parameter to "1" (default "0") will result in sending message with the highest priority which ensures the quickest possible time of delivery. Attention! Fast messages costs 50% more than normal message.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest saying Fast messages cost more than normal messages, without mentioning the actual increase of 50%. this way, this readme does not become outdated if they change their pricing to modify the ratio.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stof You are right. Done.

@marphi
Copy link
Contributor Author

marphi commented Jan 25, 2022

For the encoding one being considered as windows-1250 by default in the API, I would treat it as a bugfix, given that Symfony assumes UTF-8 by default in most places.

You are right, but in this case this PR should be slit into two PRs 🤷‍♂️

@stof @OskarStark We can leave this PR as new feature to 6.1 and I can prepare separate PR only with bugfix for encoding. If you prefer.

@OskarStark
Copy link
Contributor

Please do so, we will merge the bugfix first then 👍🏻 thank you for your patience

@marphi marphi changed the base branch from 5.3 to 6.1 January 25, 2022 19:33
@marphi
Copy link
Contributor Author

marphi commented Jan 25, 2022

@OskarStark PR only with bugfix #45174. This PR I've rebased to 6.1

stof added a commit that referenced this pull request Jan 26, 2022
This PR was merged into the 5.3 branch.

Discussion
----------

[Notifier] Use the UTF-8 encoding in smsapi-notifier

| Q             | A
| ------------- | ---
| Branch?       | 5.3
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | ---
| License       | MIT
| Doc PR        | ---

THIS PR is splitted version of PR #45139 (see discussion)

Currently smsapi-notifier does not specify encoding in payload request to provider api which generates such errors.
![image](https://user-images.githubusercontent.com/57309/151045363-a5b97e9a-94b5-4fba-b93a-76ab72a8bd5f.png)
(sms message with invalid encoding)
api.smsapi.pl use windows-1250 as a default value. I propose to set explicitly `utf-8`.
After changes:
![Zrzut ekranu 2022-01-23 o 21 52 28](https://user-images.githubusercontent.com/57309/151045277-2c11b5c5-8b0f-4f1d-b749-2661a6443a4c.png)

Commits
-------

7ad382d [Notifier] smsapi-notifier - correct encoding
@nicolas-grekas nicolas-grekas modified the milestones: 5.3, 6.1 Jan 26, 2022
@OskarStark
Copy link
Contributor

PR title should be adjusted, the encoding was fixed in a different PR

@marphi marphi changed the title [Notifier] smsapi-notifier correct encoding, optional fast option [Notifier] smsapi-notifier fast option to sending message with the highest priority Jan 26, 2022
@marphi
Copy link
Contributor Author

marphi commented Jan 26, 2022

PR title should be adjusted, the encoding was fixed in a different PR

done

@fabpot
Copy link
Member

fabpot commented Jan 27, 2022

Thank you @marphi.

fabpot added a commit that referenced this pull request Jan 27, 2022
…ssage with the highest priority (marphi)

This PR was squashed before being merged into the 6.1 branch.

Discussion
----------

[Notifier] smsapi-notifier `fast` option to sending message with the highest priority

| Q             | A
| ------------- | ---
| Branch?       | 6.1
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | ---
| License       | MIT
| Doc PR        | ---

I have used custom solution to send sms via smsapi for many years. Time to rewrite it to notifier component. Found 2 issues from my point of view:

1. THIS part is splitted into separate PR #45174. ~~Encoding. Currently `smsapi-notifier` does not specify `encoding` in payload request to provider api which generates such errors.
![image](https://user-images.githubusercontent.com/57309/150697496-76998a85-43e7-418e-a4ab-b9efe69da506.png)
(sms message with invalid encoding)
api.smsapi.pl use `windows-1250` as a default value. I propose to set explicitly `utf-8`.
After changes:~~
![image](https://user-images.githubusercontent.com/57309/150697554-e0d1a8ee-d4d5-4644-b28e-ce17e7a0a320.png)

2. I'm using smsapi to sending auth codes to my clients. In this case is really important to send SMS as fast as possible, `fast` options allow me to do this otherwise messages might have some delays.

Commits
-------

cd266a0 [Notifier] smsapi-notifier `fast` option to sending message with the highest priority
@fabpot fabpot closed this Jan 27, 2022
@fabpot fabpot force-pushed the notifier_smsapi_encoding_and_fast_options branch from 8e049a5 to cd266a0 Compare January 27, 2022 07:51
@fabpot fabpot mentioned this pull request Apr 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants