Browse SDKs · Flutter
SDKsFlutterEnterprise

Set the burn-after-reading duration

Set the message retention duration for burn-after-reading mode with the OpenIM Flutter SDK.

Copy
await OpenIM.iMManager.conversationManager.setConversation(
  conversationID,
  ConversationReq(burnDuration: 30),
);

burnDuration is measured in seconds. Enable or disable burn-after-reading mode with isPrivateChat; see Enable or disable burn after reading. Do not confuse this value with msgDestructTime, the interval for periodic server-side message deletion.

After the Future succeeds, merge the latest burnDuration through onConversationChanged. For the complete listener, see Retrieve the conversation list.