Previous messages get cleared when a new message is sent/received for the first time for a user using SyncManager

Usecase:

  1. A group chat is opened and a few messages are sent
  2. A new user joins the chat from his phone and is able to view the previous messages in the group
  3. If the new user sends or receives a new message, the previous messages get cleared due to the CLEAR event being triggered and an INSERT event is fired with just the latest message. The previous messages are not inserted.
  4. Reloading the chat group fetches all messages again and then this issue does not repeat. It’s only for the first message that is sent/received.

@Tyler

Closing this out as we’re discussing this via a support case.