From b8fc1e74111e60183ad09fde04abdc6b090a6037 Mon Sep 17 00:00:00 2001 From: bastien-phi Date: Tue, 1 Oct 2019 14:49:26 +0200 Subject: [PATCH] Add retryUntil to SendQueueNotifications (#30141) --- .../Notifications/SendQueuedNotifications.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/Illuminate/Notifications/SendQueuedNotifications.php b/src/Illuminate/Notifications/SendQueuedNotifications.php index edf79cfd06fb..62daeb5bfc3a 100644 --- a/src/Illuminate/Notifications/SendQueuedNotifications.php +++ b/src/Illuminate/Notifications/SendQueuedNotifications.php @@ -111,6 +111,20 @@ public function retryAfter() return $this->notification->retryAfter ?? $this->notification->retryAfter(); } + /** + * Get the expiration for the notification. + * + * @return mixed + */ + public function retryUntil() + { + if (! method_exists($this->notification, 'retryUntil') && ! isset($this->notification->timeoutAt)) { + return; + } + + return $this->notification->timeoutAt ?? $this->notification->retryUntil(); + } + /** * Prepare the instance for cloning. *