Twilio customized to phone number#119
Open
skybitbbsr wants to merge 3 commits intolaravel-notification-channels:masterfrom
Open
Twilio customized to phone number#119skybitbbsr wants to merge 3 commits intolaravel-notification-channels:masterfrom
skybitbbsr wants to merge 3 commits intolaravel-notification-channels:masterfrom
Conversation
Add method in message base class to override to number in message
atymic
requested changes
Mar 6, 2021
| throw CouldNotSendNotification::invalidMessageObject($message); | ||
| } | ||
|
|
||
| $to = $this->getTo($notifiable, $notification, $message); |
Member
There was a problem hiding this comment.
I commented on the last PR, but shouldn't we merge the additional tos instead of overridding?
Also, could you fix the tests please?
Author
There was a problem hiding this comment.
-
We shouldn't. As the notification is overriding the default phone number, we should not send also to the primary number defined in the model. But we can have one ->addTo([]) method to add list of phone numbers on primary phone or the phone number provided in the ->to() method.
-
I am working on the tests.
There was a problem hiding this comment.
What happened with this PR? If this is not going anywhere, can I make a PR with proper tests for this patch?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue: #118
To() method will allow developers to add phone numbers dynamically from the notification itself. If the user needs to use different phone numbers for different notifications, it will help a lot.
This is just to check if any recipient number is provided in the message itself. If provided, this means the developer wants to override the notifiable user's phone number.
And if not overridden, then we can safely use the notifiable's phone number as it was before.