laravel-firebase icon indicating copy to clipboard operation
laravel-firebase copied to clipboard

Web push with link option doesn't work

Open Stajor opened this issue 2 years ago • 1 comments

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.  

Stajor avatar Feb 25 '22 15:02 Stajor

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.

jeromegamez avatar Feb 25 '22 15:02 jeromegamez

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!

github-actions[bot] avatar Sep 23 '22 08:09 github-actions[bot]