|
|
@@ -22,6 +22,10 @@ class PushNotificationService
|
|
|
*/
|
|
|
public function sendToUser(User $user, BasePushNotification $notification): void
|
|
|
{
|
|
|
+ if (! array_key_exists('push_notifications_enabled', $user->getAttributes())) {
|
|
|
+ $user = $user->fresh() ?? $user;
|
|
|
+ }
|
|
|
+
|
|
|
if (! $user->push_notifications_enabled) {
|
|
|
return;
|
|
|
}
|