mirror of
https://github.com/filamentphp/filament.git
synced 2026-10-28 03:44:19 +08:00
* fix: prevent duplicate notifications when Livewire events are batched Fixes #16662 When a child component fires both a notification and a Livewire event, the dehydrate hook runs for every component being dehydrated. Previously, each component checked session()->get() (non-destructive) and dispatched 'notificationsSent', causing duplicate notifications. This change uses session()->pull() (destructive read) to atomically claim notifications on first dehydrate, and passes the notification data directly with the dispatch event. This prevents subsequent component dehydrations from seeing the same session data. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Do not allow notifications to leave the server * Update Notification.php Signed-off-by: Dan Harrin <git@danharrin.com> --------- Signed-off-by: Dan Harrin <git@danharrin.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: Dan Harrin <git@danharrin.com>