-
Notifications
You must be signed in to change notification settings - Fork 19
Description
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"}