Skip to content
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

On-demand Notifications addressed to multiple recipients are broken after PR #24606 #24729

Closed
pmatseykanets opened this issue Jul 2, 2018 · 1 comment

Comments

@pmatseykanets
Copy link
Contributor

  • Laravel Version: 5.6.26
  • PHP Version: 7.2
  • Database Driver & Version: irrelevant to this issue

Description:

PR #24606 unfortunately broke on-demand notifications addressed to multiple recipients.

Up until this PR the following worked just fine

Notification::route('mail', ['user1@example.com', 'user2@example.com'])
    ->notify(new InvoicePaid($invoice));

After this PR the notification is being sent only to the last recipient - user2@example.com.

protected function getRecipients($notifiable, $notification, $message)

is returning only the last item in the array because it's being overwritten here

Steps To Reproduce:

  • Issue an on-demand notification addressed to multiple users as in the example above
  • See in the log driver or by other means (MailHog etc) that it has been sent only to the last recipient
PaegleK pushed a commit to PaegleK/framework that referenced this issue Jul 24, 2018
PR laravel#24606 unfortunately broke on-demand notifications addressed to multiple recipients.
This fixes Issue  laravel#24729 and laravel#24956
taylorotwell pushed a commit that referenced this issue Jul 26, 2018
* Fix multiple notification recipients

PR #24606 unfortunately broke on-demand notifications addressed to multiple recipients.
This fixes Issue  #24729 and #24956

* Added test for multiple mail recipients.

* Remove unnecessary spaces.
@laurencei
Copy link
Contributor

Closing as PR with fix was merged

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

No branches or pull requests

2 participants