Browse SDKs · uni-app / uni-app x
SDKsuni-appEnterprise

Set the burn duration

OpenIM uni-app / uni-app x SDK guide for Set the burn duration.

Copy

burnDuration is a Commercial conversation field that defines the read-burn duration in seconds.

import { setConversation } from '@/uni_modules/unix-openim-sdk'

await setConversation({ conversationID, burnDuration: 30 })

The unit is seconds. Enabling or disabling read-burn mode also requires isPrivateChat; see Enable or disable private chat.

Do not confuse burnDuration with the server message-retention interval msgDestructTime. A client countdown is presentation only and must not directly delete server messages. Promise success means that the update request completed; merge burnDuration from onConversationChanged or requery the conversation. Disable the feature according to the product protocol rather than simulating server state with a local switch.