Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. If the user registers to FCM after the message has been broadcasted then the new user will not get the notification that was sent before. The solution for this may be, the server can run a cron job for repeatedly sending messages.

...

Post Discussion -

...

1. Tenant/Channel based topics 

2. General sub to a topic by defaultk

3. Structure a payload - Type of notifications, parameters of a payload

...

 

  1. There will be tenant/channel based topics subscribed by the client.
  2. By default, all clients subscribe to one topic.
  3. And below will be the structure of payloads.

Payload for display messages:

Wiki Markup
{
  "actiontype": "display",
  "notificationtype": "general/festive/downtime/others",
  "notificationid": "1235",
  "expiry": "34646millis",
  "type": "cancellable/non-cancellable",
  "channel": "channel-id",
  "poster": "image-url",
  "fields": [
    {
      "language": "en",
      "title": "Welcome to Sunbird!",
      "msg": "Congratulations on downloading Sunbird, every child's best friend in their learning journey."
    },
    {
      "language": "hi",
      "title": "Welcome to Sunbird!",
      "msg": "Congratulations on downloading Sunbird, every child's best friend in their learning journey."
    }
  ]
}

Payload for non-display messages:

{
"actiontype": "non-display",
"notificationtype": "enable-feature/disable-feature",
"notificationid": "1235",
"expiry": "34646millis",
"data": "free form string data"
}