parse-community / parse-server-push-adapter

A push notification adapter for Parse Server
https://parseplatform.org
MIT License
85 stars 100 forks source link

Can't send push to Android and iOS when using alert: {... in data #212

Open adammlevy opened 1 year ago

adammlevy commented 1 year ago

Issue Description

I recently changed the push data payload so that a subtitle can show up on iOS devices but that change has caused the JSON payload to show up in the push on Android devices. This is how I'm sending the push:

Parse.Push.send({
            where: mainQuery,
            data: {
                alert: {
                    title : pushMessage.title,
                    subtitle: pushMessage.subtitle,
                    body: pushMessage.message
                },
                sound: pushMessage.sound,
                reportType: pushMessage.reportType,
                uri: pushMessage.uri,
                payload: pushMessage.payload    
            }
            }, {
            useMasterKey: true,
            success: function() {

            },
            error: function(error) {

            }
        });

What param to I have to pass in order to display the push properly on Android and iOS.

Steps to reproduce

Send a push to iOS and Android devices using the above format

Actual Outcome

Push gets properly sent to iOS properly but not Android

Expected Outcome

Push gets sent properly to both iOS and Android

Environment

?

Client

Server

Database

Client

Logs

None included

parse-github-assistant[bot] commented 1 year ago

Thanks for opening this issue!

mman commented 1 month ago

I believe this should be addressed by https://github.com/parse-community/parse-server-push-adapter/pull/238.

mman commented 1 month ago

@adammlevy Please try https://github.com/parse-community/parse-server-push-adapter/releases/tag/6.1.1 or newer, your issue should be addressed there, and close if appropriate...