Push.on('notification') on iOS gets automatically triggered

@Vukasin Nikodijevic
Sat, 09 Jul 2016 16:07:02 +0000
ionic 2

@Vukasin wrote:

App is in foreground and notification is received.

Expected behaviour is to have notification in notification drawer and once I click it, then trigger push.on('notification' .. event.

What I'm getting is that once notification is received it automatically triggers push.on('notification', ... event.

GCM Notification payload:

{
    "to":"**************************",
    "notification" : {
      "body" : "Comment was added on support ticket 1122",
      "title" : "Notification",
      "image": "icon"
    },
    "content-available": "1",
    "data" : {
        "event_type": "support_ticket_commented",
        "user_username": "User",
        "type": "event"
    }
}

I'm I missing something ?

Posts: 2