We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When using a payload for example:
{"notification":{"title":"We are opening soon","body":"test"}, "android": {"notification": {"sound": "soon.wav","channel_id":"soon"}}}
The "android" part is being overwritten when you set setPriority or setTimeToLive.
it is then overwritten by
"android":{"priority":"HIGH","ttl":"86400s"}
We could fix it by modifying "Client.php" to use array_replace_recursive instead of array_merge
if (!is_null($notification)) { $result = array_replace_recursive($result, $notification()); $isPlayload = true; } if (!is_null($data)) { $result = array_replace_recursive($result, $data()); $isPlayload = true; } if (!is_null($config)) { $result = array_replace_recursive($result, $config()); }
if (!is_null($notification)) { $result = array_replace_recursive($result, $notification()); $isPlayload = true; }
if (!is_null($data)) { $result = array_replace_recursive($result, $data()); $isPlayload = true; }
if (!is_null($config)) { $result = array_replace_recursive($result, $config()); }
Which will result in:
"android":{"notification":{"sound":"soon.wav","channel_id":"soon"},"priority":"HIGH","ttl":"86400s"}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When using a payload for example:
{"notification":{"title":"We are opening soon","body":"test"}, "android": {"notification": {"sound": "soon.wav","channel_id":"soon"}}}
The "android" part is being overwritten when you set setPriority or setTimeToLive.
it is then overwritten by
"android":{"priority":"HIGH","ttl":"86400s"}
We could fix it by modifying "Client.php" to use array_replace_recursive instead of array_merge
if (!is_null($notification)) { $result = array_replace_recursive($result, $notification()); $isPlayload = true; }
if (!is_null($data)) { $result = array_replace_recursive($result, $data()); $isPlayload = true; }
if (!is_null($config)) { $result = array_replace_recursive($result, $config()); }
Which will result in:
"android":{"notification":{"sound":"soon.wav","channel_id":"soon"},"priority":"HIGH","ttl":"86400s"}
The text was updated successfully, but these errors were encountered: