Commaaa2
This commit is contained in:
@@ -76,7 +76,7 @@ class NotificationSender
|
||||
return $this->queueNotification($notifiables, $notification);
|
||||
}
|
||||
|
||||
return $this->sendNow($notifiables, $notification);
|
||||
$this->sendNow($notifiables, $notification);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -162,6 +162,11 @@ class NotificationSender
|
||||
*/
|
||||
protected function shouldSendNotification($notifiable, $notification, $channel)
|
||||
{
|
||||
if (method_exists($notification, 'shouldSend') &&
|
||||
$notification->shouldSend($notifiable, $channel) === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return $this->events->until(
|
||||
new NotificationSending($notifiable, $notification, $channel)
|
||||
) !== false;
|
||||
@@ -202,7 +207,10 @@ class NotificationSender
|
||||
(new SendQueuedNotifications($notifiable, $notification, [$channel]))
|
||||
->onConnection($notification->connection)
|
||||
->onQueue($queue)
|
||||
->delay($notification->delay)
|
||||
->delay(is_array($notification->delay) ?
|
||||
($notification->delay[$channel] ?? null)
|
||||
: $notification->delay
|
||||
)
|
||||
->through(
|
||||
array_merge(
|
||||
method_exists($notification, 'middleware') ? $notification->middleware() : [],
|
||||
|
||||
Reference in New Issue
Block a user