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'], );