Browse SDKs · WASM
SDKsWASMEnterprise

Set the burn duration

Set how long messages remain in burn-after-reading mode for a conversation.

Copy

burnDuration is measured in seconds and describes only the duration for burn-after-reading mode.

await openimsdk.setConversation({
  conversationID,
  burnDuration: 30,
});

Enable or disable the mode separately through isPrivateChat; see Enable or disable burn after reading. Do not confuse burnDuration with msgDestructTime, the scheduled server-message deletion interval.

After the Promise succeeds, merge the latest burnDuration from OnConversationChanged. See Get the conversation list for the complete listener.