MSMessage State Handling in Group Conversations

Hi there,


As best we can tell from the documentation, state handling in message apps is (only?) handled by passing around the URL field of MSMessage objects for a given session. How is the state of the URL field handled in group conversations where latency can be an issue? For example, imagine a 3 people trying to use the provided IceCreamBuilder sample app:

  1. User A starts the session and chooses a base. (URL: Base=1)
  2. User B chooses Mint Chip and hits send, but is on a slow, EDGE connection. (URL: Base=1&Scoops=2)
  3. User C chooses Pluot and hits send, and is on a fast connection so User A sees this immediately. (URL: Base=1&Scoops=6)
  4. When users A & C eventually gets User B's message, it's reasonable that `didReceive(_ message: MSMessage, conversation: MSConversation)` could be called if the extension is running, but there's nothing the message extension can resonably do, as the scoops selecion has already been made by User C (Base=1&Scoops=6)

What actually happens when user B's message arrives for user A and user C? Does it overwrite user C's selection and make activeMessage's URL Base=1&Scoops=2? Or does user C's selection persist because it had a later send date? Similarly, what happens on user B's device when the selection from user C arrives after it has made it's own selection? How does it look in the Messages app?

There seems to be no functionality in the API to specify what happens in this sort of scenario. Any guidence would be appreciated, though I understand if it's simply "Don't rely on the URL for state handling."


Thanks!

MSMessage State Handling in Group Conversations
 
 
Q