After uninstalling using the Rongyun session list, there is still a problem with session data.

After uninstalling using the Rongyun session list, there is still a problem with session data.

This article mainly records and shares a problem when using Rongyun SDK and the concept of offline message compensation involved.

phenomenon

  1. Chat with multiple people on the current device
  2. Uninstall the app
  3. Reinstall the app and log in to this user
  4. The current user’s session list will be refreshed again

the reason

The first point to note is that Rongyun SDK will not store the session list data on the server, but only locally . So logically speaking, after I uninstall the APP, all the locally stored data will be cleared.

So where did the new conversation list come from?

After communicating with Rongyun technical staff, I learned that although Rongyun's conversation list is only stored locally. But there is one more feature, which is important! ! !

Offline messaging compensation this function Developer Platform will open in your multi-device synchronization messages were forcibly open time.

Official website explanation:

It refers to a compensation mechanism for messages after the user replaces the device or uninstalls and reinstalls the application, so that the user can view the messages sent and received on other terminals in the last 2 days on the new device. The compensation function needs to be in IM It is only supported after the "multi-device message synchronization" function is enabled in the commercial version.

The reply from the customer service is that this date can be adjusted!

Therefore, the conversation list that appears after uninstalling and reinstalling is not the stored conversation list, but a part of the message is compensated back, and then the conversation list is forcibly generated.

Record it and share it with everyone to avoid everyone encountering the same problem.

Guess you like

Origin blog.51cto.com/15056506/2678328