Browse SDKs · React Native
Platform
SDKsReact NativeEnterprise

Enable or disable private chat

Toggle private chat mode (burn-after-reading) for a direct conversation using the OpenIM React Native SDK.

Copy

Toggle the burn-after-reading private chat mode for a direct one-to-one conversation. The countdown duration after reading is configured separately via Set burn duration.

await OpenIMSDK.setConversationPrivateChat({
  conversationID,
  isPrivate: true,
});

Parameters

ParameterTypeRequiredDescription
conversationIDstringYesTarget conversation ID to configure.
isPrivatebooleanYesSet true to enable burn-after-reading, or false to disable it.

Return value

A resolved Promise confirms that the private chat setting has been saved to the server.

The update triggers the OnConversationChanged event. Locate the conversation by conversationID in your local store and update isPrivateChat. For event details, see Retrieve conversation list.