Browse SDKs · React Native
Platform
SDKsReact NativeEnterprise

Set burn duration

Configure the burn-after-reading countdown duration in a direct chat using the OpenIM React Native SDK.

Copy

Configure the countdown duration (in seconds) before read messages are destroyed in a direct 1-on-1 chat. This method adjusts only the duration; toggling private chat on or off is managed via Enable or disable private chat. Do not confuse burnDuration with the server-wide message retention period msgDestructTime.

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

Parameters

ParameterTypeRequiredDescription
conversationIDstringYesTarget conversation ID to configure.
burnDurationnumberYesBurn countdown duration in seconds.

Return value

A resolved Promise confirms that the burn duration setting has been persisted on the server.

The update triggers the OnConversationChanged event. Use conversationID to locate the target conversation in your state store and update its burnDuration property. For event listener details, see Retrieve conversation list.