From 664e87f0d36635495f19c17eee3f51082be660b5 Mon Sep 17 00:00:00 2001 From: iamgergo Date: Wed, 18 Nov 2020 16:38:29 +0100 Subject: [PATCH] [8.x] Support delaying notifications by channel --- src/Illuminate/Notifications/NotificationSender.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Illuminate/Notifications/NotificationSender.php b/src/Illuminate/Notifications/NotificationSender.php index 1d6c424b1512..d3f95433be9a 100644 --- a/src/Illuminate/Notifications/NotificationSender.php +++ b/src/Illuminate/Notifications/NotificationSender.php @@ -202,7 +202,9 @@ protected function queueNotification($notifiables, $notification) (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() : [],