1
0
Fork 0
mirror of synced 2024-06-27 02:31:04 +12:00

feat: use param instead

This commit is contained in:
loks0n 2024-05-30 16:34:43 +01:00
parent c6a520909e
commit 72cca45d6d

View file

@ -400,9 +400,7 @@ class Messaging extends Action
'twilio' => [
'accountSid' => $user,
'authToken' => $password,
// Twilio Messaging Service SIDs always start with MG
// https://www.twilio.com/docs/messaging/services
'messagingServiceSid' => \str_starts_with($from, 'MG') ? $from : null
'messagingServiceSid' => $smsDSN->getParam('messagingServiceSid') ?? null
],
'textmagic' => [
'username' => $user,
@ -425,7 +423,7 @@ class Messaging extends Action
},
'options' => match ($host) {
'twilio' => [
'from' => \str_starts_with($from, 'MG') ? null : $from
'from' => $smsDSN->getParam('messagingServiceSid') ? null : $from
],
default => [
'from' => $from