diff --git a/app/Livewire/Settings/Notifications.php b/app/Livewire/Settings/Notifications.php index 165d2f3..96c0b15 100644 --- a/app/Livewire/Settings/Notifications.php +++ b/app/Livewire/Settings/Notifications.php @@ -121,7 +121,10 @@ public function sendTest(int $channelId): void $monitor->id = 0; $monitor->last_checked_at = now(); - NotificationFacade::send([$channel], new MonitorRecovered($monitor)); + // sendNow() bypasses the queue — a queued test would try to + // re-hydrate this transient Monitor via findOrFail($id) on the worker + // and silently fail, leaving the user wondering why nothing arrived. + NotificationFacade::sendNow([$channel], new MonitorRecovered($monitor)); $this->dispatch('notifications-test-sent', channelId: $channel->id); } diff --git a/resources/views/livewire/settings/notifications.blade.php b/resources/views/livewire/settings/notifications.blade.php index 99eaf75..b5ff0d3 100644 --- a/resources/views/livewire/settings/notifications.blade.php +++ b/resources/views/livewire/settings/notifications.blade.php @@ -50,7 +50,7 @@ class="btn btn-ghost btn-sm"> x-on:notifications-test-sent.window="if ($event.detail.channelId === {{ $channel->id }}) { sent = true; setTimeout(() => sent = false, 2500); }" class="flex items-center gap-2">