Skip to content

Commit ee26981

Browse files
authored
Fix queueable notification's id overwritten (#42581)
When the notification ID has been assigned, It should not be overwritten. Even in the queue.
1 parent 702c119 commit ee26981

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Illuminate/Notifications/NotificationSender.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,9 @@ protected function queueNotification($notifiables, $notification)
191191
foreach ((array) $original->via($notifiable) as $channel) {
192192
$notification = clone $original;
193193

194-
$notification->id = $notificationId;
194+
if (! $notification->id) {
195+
$notification->id = $notificationId;
196+
}
195197

196198
if (! is_null($this->locale)) {
197199
$notification->locale = $this->locale;

0 commit comments

Comments
 (0)