feat: use param instead
This commit is contained in:
parent
c6a520909e
commit
72cca45d6d
1 changed files with 2 additions and 4 deletions
|
@ -400,9 +400,7 @@ class Messaging extends Action
|
||||||
'twilio' => [
|
'twilio' => [
|
||||||
'accountSid' => $user,
|
'accountSid' => $user,
|
||||||
'authToken' => $password,
|
'authToken' => $password,
|
||||||
// Twilio Messaging Service SIDs always start with MG
|
'messagingServiceSid' => $smsDSN->getParam('messagingServiceSid') ?? null
|
||||||
// https://www.twilio.com/docs/messaging/services
|
|
||||||
'messagingServiceSid' => \str_starts_with($from, 'MG') ? $from : null
|
|
||||||
],
|
],
|
||||||
'textmagic' => [
|
'textmagic' => [
|
||||||
'username' => $user,
|
'username' => $user,
|
||||||
|
@ -425,7 +423,7 @@ class Messaging extends Action
|
||||||
},
|
},
|
||||||
'options' => match ($host) {
|
'options' => match ($host) {
|
||||||
'twilio' => [
|
'twilio' => [
|
||||||
'from' => \str_starts_with($from, 'MG') ? null : $from
|
'from' => $smsDSN->getParam('messagingServiceSid') ? null : $from
|
||||||
],
|
],
|
||||||
default => [
|
default => [
|
||||||
'from' => $from
|
'from' => $from
|
||||||
|
|
Loading…
Reference in a new issue