Browse SDKs · React Native
SDKsReact NativeEnterprise

Set the burn duration

Set the burn-after-reading duration for a conversation.

Copy

Call setConversationBurnDuration() to set the burn-after-reading duration in seconds. This method sets only the duration; use Enable or disable burn after reading to enable the mode. Do not confuse burnDuration with the server-side deletion period msgDestructTime.

await OpenIMSDK.setConversationBurnDuration({
  conversationID,
  burnDuration: 30,
});

Parameters

ParameterTypeRequiredDescription
conversationIDstringYesConversation ID to update.
burnDurationnumberYesBurn-after-reading duration in seconds.

Return result

After the call completes, the conversation's burn-after-reading duration is updated. Changes in the conversation list are delivered through OnConversationChanged; see Retrieve the conversation list.