Skip to content

Commit

Permalink
Improve the Nova\Notifications\ChannelManager
Browse files Browse the repository at this point in the history
  • Loading branch information
LuckyCyborg committed May 11, 2018
1 parent c6ab98e commit 2333ee8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Foundation/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class Application extends Container implements ResponsePreparerInterface
*
* @var string
*/
const VERSION = '4.0.49';
const VERSION = '4.0.50';

/**
* Indicates if the application has "booted".
Expand Down
12 changes: 9 additions & 3 deletions src/Notifications/ChannelManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,17 @@ protected function shouldSendNotification($notifiable, $notification, $channel)
protected function queueToNotifiable($notifiable, $id, $notification, $channel)
{
$notification->id = $id;

$connection = isset($notification->connection) ? $notification->connection : null;

$queue = isset($notification->queue) ? $notification->queue : null;

$delay = isset($notification->delay) ? $notification->delay : null;

$job = with(new SendQueuedNotifications($notifiable, $notification, array($channel)))
->onConnection($notification->connection)
->onQueue($notification->queue)
->delay($notification->delay);
->onConnection($connection)
->onQueue($queue)
->delay($delay);

$this->bus->dispatch($job);
}
Expand Down

0 comments on commit 2333ee8

Please sign in to comment.