laravel-notification-channels / fcm

Firebase Cloud Messaging (FCM) notifications channel for Laravel
https://laravel-notification-channels.com/
MIT License
495 stars 127 forks source link

Added validation for anything other than a string in setData #109

Closed marvelefe closed 2 years ago

marvelefe commented 2 years ago

What's inside

Passing anything through other than a string in SetData causes the push notification to not be received.

return FcmMessage::create()
            ->setData([
                'foo' => 'bar',
                '1' => 2,
            ])
            ->setNotification(
                \NotificationChannels\Fcm\Resources\Notification::create()
                    ->setTitle('title')
                    ->setBody('body')
            );


This PR: