mirror of
https://gitlab.linphone.org/BC/public/flexisip-account-manager.git
synced 2026-01-17 01:58:07 +00:00
Fix FLEXIAPI-208 Add SMS templates documentation
This commit is contained in:
parent
53f47045c5
commit
b0cfa0f08d
3 changed files with 21 additions and 3 deletions
|
|
@ -5,6 +5,7 @@ v1.6
|
|||
- Fix FLEXIAPI-192 Add DotEnv configuration to allow the expiration of tokens and codes in the app
|
||||
- Fix FLEXIAPI-196 Add a phone validation system by country code with configuration panels and related tests and documentation
|
||||
- Fix FLEXIAPI-203 Implement domain based Linphone configuration, add documentation, complete API endpoints, complete provisioning XML
|
||||
- Fix FLEXIAPI-208 Add SMS templates documentation
|
||||
|
||||
v1.5
|
||||
---
|
||||
|
|
|
|||
11
README.md
11
README.md
|
|
@ -204,6 +204,17 @@ You can also seed the tables with test accounts for the liblinphone test suite w
|
|||
|
||||
php artisan accounts:seed /path/to/accounts.json
|
||||
|
||||
## SMS templates
|
||||
|
||||
To send SMS to the USA some providers need to validate their templates before transfering them, see [Sending SMS messages to the USA - OVH](https://help.ovhcloud.com/csm/en-ie-sms-sending-sms-to-usa?id=kb_article_view&sysparm_article=KB0051359).
|
||||
|
||||
Here are the currently used SMS templates in the app to declare in your provider panel:
|
||||
|
||||
- Recovery code: `Your #APP_NAME# creation code is #CODE#`
|
||||
- Validation code: `Your #APP_NAME# recovery code is #CODE#`
|
||||
- Validation code: `Your #APP_NAME# validation code is #CODE#`
|
||||
- Validation code with expiration: `Your #APP_NAME# validation code is #CODE#. The code is available for #CODE_MINUTES# minutes`
|
||||
|
||||
## Custom email templaces
|
||||
|
||||
Some email templates can be customized.
|
||||
|
|
|
|||
|
|
@ -241,8 +241,14 @@ class AccountService
|
|||
|
||||
Log::channel('events')->info('Account Service: Account phone change requested by SMS', ['id' => $account->identifier]);
|
||||
|
||||
$message = 'Your ' . config('app.name') . ' validation code is ' . $phoneChangeCode->code . '.';
|
||||
|
||||
if (config('app.recovery_code_expiration_minutes') > 0) {
|
||||
$message .= ' The code is available for ' . config('app.recovery_code_expiration_minutes') . ' minutes';
|
||||
}
|
||||
|
||||
$ovhSMS = new OvhSMS();
|
||||
$ovhSMS->send($request->get('phone'), 'Your ' . config('app.name') . ' validation code is ' . $phoneChangeCode->code);
|
||||
$ovhSMS->send($request->get('phone'), $message);
|
||||
}
|
||||
|
||||
public function updatePhone(Request $request): ?Account
|
||||
|
|
@ -381,10 +387,10 @@ class AccountService
|
|||
{
|
||||
$account = $this->recoverAccount($account);
|
||||
|
||||
$message = 'Your ' . config('app.name') . ' validation code is ' . $account->recovery_code . ' .';
|
||||
$message = 'Your ' . config('app.name') . ' validation code is ' . $account->recovery_code . '.';
|
||||
|
||||
if (config('app.recovery_code_expiration_minutes') > 0) {
|
||||
$message .= 'The code is available for ' . config('app.recovery_code_expiration_minutes') . ' minutes';
|
||||
$message .= ' The code is available for ' . config('app.recovery_code_expiration_minutes') . ' minutes';
|
||||
}
|
||||
|
||||
$ovhSMS = new OvhSMS();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue