From 8ff24135d13739f05ab275ca35579d3713480ff5 Mon Sep 17 00:00:00 2001 From: Yoga Pangestu Date: Tue, 24 Feb 2026 07:51:52 +0700 Subject: [PATCH] Fix: accept subscriptions as array or JSON string for web push. --- app/Jobs/StorePushNotification.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Jobs/StorePushNotification.php b/app/Jobs/StorePushNotification.php index a06c2a8..f938d8d 100644 --- a/app/Jobs/StorePushNotification.php +++ b/app/Jobs/StorePushNotification.php @@ -41,7 +41,7 @@ public function handle(): void foreach ($this->notificationQuery as $notification) { $webPush->sendOneNotification( - Subscription::create(json_decode($notification->subscriptions, true)), + Subscription::create(is_array($notification->subscriptions) ? $notification->subscriptions : json_decode($notification->subscriptions, true)), $payload, ['TTL' => 86400, 'urgency' => 'high'], );