This commit is contained in:
Paolo A
2024-08-13 13:44:16 +00:00
parent 1bbb23088d
commit e796d76612
4001 changed files with 30101 additions and 40075 deletions

View File

@@ -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() : [],