Meteor-Community-Packages / raix-push

DEPRECATED: Push notifications for cordova (ios, android) browser (Chrome, Safari, Firefox)
https://atmospherejs.com/raix/push
MIT License
514 stars 197 forks source link

Event listeners not working correctly #267

Closed indesignlatam closed 7 years ago

indesignlatam commented 7 years ago

I have implemented listeners on an app but im not getting events on warm startup and on message or alert listeners.

I have the following listeners

Push.addListener('startup', (notification) => {
    // Called when message received on startup (cold+warm)
    if(!notification.payload){
        return;
    }

    if(notification.payload.flowrouter && notification.payload.flowrouter.route){
        const route = notification.payload.flowrouter.route;
        let params  = null;

        if(notification.payload.flowrouter.params){
            params = notification.payload.flowrouter.params;
        }

        FlowRouter.go(route, params);
    }
});

Push.addListener('message', (notification) => {
    alert(notification.message);
});

Push.addListener('alert', (notification) => {
    alert(notification.message);
});

Thanks in advance for any help.

indesignlatam commented 7 years ago

It only fails to trigger events on iOS android events work correctly.

raix commented 7 years ago

is it related to https://github.com/raix/push/issues/265 ?

indesignlatam commented 7 years ago

Its the opposite and adding that line didnt work. I recently tested a new build with test flight and seems to be solved. When the new build is in prod i will update this issue or close it.

Thanks @raix