New issue

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

Same data payload for messages with action buttons #90

Closed
mauron85 opened this Issue Aug 31, 2015 · 5 comments

Comments

Projects
None yet
2 participants
@mauron85

Everytime I send message:

{
    priority: 'high',
    timeToLive: 3000, // Duration in seconds to hold in GCM and retry before timing out. Default 4 weeks (2,419,200 seconds) if not specified.
    data: {
        title: 'title'
        message: 'message',
        trackingNr: 'AZ-12312312312',
        actions: [
            { icon: 'accept', title: 'INTERESTED', callback: 'app.accept},
            { icon: 'deny', title: 'NOT INTERESTED', callback: 'app.deny'},
        ]
    }
}

where trackingNr is kind of UUID

In app.accept callback handler I get same msg.additionaData.trackingNr , meaning if i send first message with trackingNr='AZ-12312312312' all following message have msg.additionalData.trackinNr === 'AZ-12312312312', until I restart the app.

window.app = {};
app.accept = function (msg) {
    console.log('[DEBUG] job accepted', msg);
};
@mauron85

This comment has been minimized.

Show comment
Hide comment
@mauron85

mauron85 Aug 31, 2015

This is the actual message (received by app.accept handler) which is always the same (repeatedly), even though in android notification area the messages are displayed correctly.

{
    "callback": "app.accept",
    "title": "New job offer",
    "message": "Vajnorská ulica 100,831 04 Bratislava\nEgrešová 9, Bratislava 2",
    "additionalData": {
        "actions": [{
            "icon": "accept",
            "callback": "app.accept",
            "title": "INTERESTED"
        }, {
            "icon": "deny",
            "callback": "app.deny",
            "title": "NOT INTERESTED"
        }],
        "from": "556707696232",
        "trackingNr": "AD-55e45808a8f243358c16dc56",
        "coldstart": false,
        "collapse_key": "do_not_collapse",
        "foreground": false
    }
}

This is the actual message (received by app.accept handler) which is always the same (repeatedly), even though in android notification area the messages are displayed correctly.

{
    "callback": "app.accept",
    "title": "New job offer",
    "message": "Vajnorská ulica 100,831 04 Bratislava\nEgrešová 9, Bratislava 2",
    "additionalData": {
        "actions": [{
            "icon": "accept",
            "callback": "app.accept",
            "title": "INTERESTED"
        }, {
            "icon": "deny",
            "callback": "app.deny",
            "title": "NOT INTERESTED"
        }],
        "from": "556707696232",
        "trackingNr": "AD-55e45808a8f243358c16dc56",
        "coldstart": false,
        "collapse_key": "do_not_collapse",
        "foreground": false
    }
}
@macdonst

This comment has been minimized.

Show comment
Hide comment
@macdonst

macdonst Aug 31, 2015

Member

I'm so embarrassed, fixed now. Pushed 1.2.2.

Member

macdonst commented Aug 31, 2015

I'm so embarrassed, fixed now. Pushed 1.2.2.

@macdonst macdonst closed this Aug 31, 2015

@mauron85

This comment has been minimized.

Show comment
Hide comment
@mauron85

mauron85 Sep 1, 2015

Thank you, works like charm now ;-)

mauron85 commented Sep 1, 2015

Thank you, works like charm now ;-)

@macdonst

This comment has been minimized.

Show comment
Hide comment
@macdonst

macdonst Sep 1, 2015

Member

@mauron85 great to hear. Keep logging issues if you find stuff. Still ticked at this dumb mistake.

Member

macdonst commented Sep 1, 2015

@mauron85 great to hear. Keep logging issues if you find stuff. Still ticked at this dumb mistake.

@lock

This comment has been minimized.

Show comment
Hide comment
@lock

lock bot Jun 5, 2018

This thread has been automatically locked.

lock bot commented Jun 5, 2018

This thread has been automatically locked.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 5, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.