laravel-firebase
laravel-firebase copied to clipboard
Web push with link option doesn't work
Code from the documentations
$config = WebPushConfig::fromArray([
'notification' => [
'title' => '$GOOG up 1.43% on the day',
'body' => '$GOOG gained 11.80 points to close at 835.67, up 1.43% on the day.',
'icon' => 'https://my-server/icon.png',
],
'fcm_options' => [
'link' => 'https://my-server/some-page',
],
]);
Throws exception
In InvalidMessage.php line 22:
Invalid JSON payload received. Unknown name "link" at 'message.fcm_options': Cannot find field.
Please provide a reproducible code snippet and/or the full message that you've sent to the Firebase Servers. Also, please share which version of the SDK you're using.
According to https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#WebpushConfig the code looks correct so far.
There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale. Please make sure to update to the latest version and check if that solves the issue. Let me know if that works for you by leaving a 👍. Because this issue is marked as stale, it will be closed and locked in 7 days if no further activity occurs. Thank you for your contributions!