ttuan
5/17/2017 - 2:14 AM

Notification format.md

Notification Doc

Chat

When user receive a new message

When user1 sends a message to user2, user2 will receive a notification with format: iOS

{
  APNS: {
    aps: {
      alert: {
        body: first 40 characters in message's content. If message is
        file/location message, we'll send "You have new file/ location"
      },
      sound: "default"
    }
  },

  APNS_SANDBOX: Same content with APNS,

  category: "conversation",
  id: conversation_id,
}

Android:

{
  GCM: {
    notification: {
      text: first 40 characters in message's content. If message is
        file/location message, we'll send "You have new file/ location"
    }
  },

  category: "conversation",
  id: conversation_id,
}

Reservation

iOS

{
  APNS: {
    aps: {
      alert: {
        body: Notification's content
      },
      sound: "default"
    }
  },

  APNS_SANDBOX: Same content with APNS,

  category: "reservation",
  id: reservation_id,
}

Android:

{
  GCM: {
    notification: {
      text: Notification body
    }
  },

  category: "reservation",
  id: reservation_id,
}