WebAPI/SimplePush: Difference between revisions

Jump to navigation Jump to search
Line 246: Line 246:
The UserAgent '''SHOULD'''
The UserAgent '''SHOULD'''
# Send a list of <channelID, pushEndpoint, version> pairs capturing its current state to PushServer, along with the UAID.
# Send a list of <channelID, pushEndpoint, version> pairs capturing its current state to PushServer, along with the UAID.
# If the PushServer accepts the request, it SHOULD update its records. UserAgent and PushServer are now back in sync. DONE
# If the PushServer accepts the request, it SHOULD update its records. It should reply with an 'expired' field of the list of channel IDs that app servers tried to contact and received a 404. The UA should remove those IDs from its records. UA and server are now IN SYNC. UA should ask those applications registered for expired ChannelIDs to re-register.
# If the PushServer detects a duplicate UAID, it SHOULD respond with an error.
# If the PushServer detects a duplicate UAID, it SHOULD respond with an error.
# In this case, the client should invalidate its current state and ask apps application to re-register using the <tt>push-register</tt> system message. UserAgent and PushServer will now organically sync similar to standard /register calls.
# In this case, the client should invalidate its current state and ask apps application to re-register using the <tt>push-register</tt> system message. UserAgent and PushServer will now organically sync similar to standard /register calls.
Line 261: Line 261:


  {
  {
   "digest": "..."
   "expired": ["channelID1", "channelID2", ...]
  }
  }
UserAgent should confirm match


===== Errors =====
===== Errors =====


* ReRegister - The server may response with this for any reason, although usually it'll be due to duplicate UAID.
* Duplicate UAID - The server may response with this for any reason, although usually it'll be due to duplicate UAID.


===== Example =====
===== Example =====
Confirmed users
93

edits

Navigation menu