Set burn duration
Configure the burn-after-reading countdown duration in a direct chat using the OpenIM React Native SDK.
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
| Parameter | Type | Required | Description |
|---|---|---|---|
conversationID | string | Yes | Target conversation ID to configure. |
burnDuration | number | Yes | Burn 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.
Was this page helpful?