Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Notifier] Allow MessageOptions in SmsMessage #48254

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
leblanc-simon opened this issue Nov 20, 2022 · 1 comment
Closed

[Notifier] Allow MessageOptions in SmsMessage #48254

leblanc-simon opened this issue Nov 20, 2022 · 1 comment

Comments

@leblanc-simon
Copy link
Contributor

Description

Most of SMS providers allow some options in their API (like priority, encoding, sending date, short links, ...) and usually this options must be specifics to each SMS (not, globally, for all SMS sent)

Actually, only ChatMessage and PushMessage can have options. Recently (for 6.2), SmsMessage can have a "from" (#45987).

It would be interesting to have the possibility of adding additional options. I can propose a PR but I would like to know if:

  • we add the options in 4th parameters
  • we replace (BC) the "from" by the options and we modify the code of all notifiers to take account of this change

Example

Before :

$smsMessage = new SmsMessage('+3312345678', 'subject');
$texter->send($smsMessage);

After :

$smsMessage = new SmsMessage('+3312345678', 'subject');

$options = (new OvhCloudOptions())
    ->setPriority('high')
    ->setFrom('sender') // Maybe move "from" with options
;

$smsMessage->options($options);

$texter->send($smsMessage);
@leblanc-simon
Copy link
Contributor Author

Closed in favor of #48503

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants