SDKsFlutterEnterprise
Set private chat
Enable or disable burn-after-reading private chat mode for a conversation using the OpenIM Flutter SDK.
Enable or disable burn-after-reading private chat mode for a specified conversation:
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
conversationID | String | Yes | Target conversation ID. |
req | ConversationReq | Yes | Conversation modification request object. Set isPrivateChat to true to enable private chat mode, or false to disable it. |
Code example
await OpenIM.iMManager.conversationManager.setConversation(
conversationID,
ConversationReq(isPrivateChat: true),
);Return value
A successful Future indicates that the private chat state has been updated on the server. The actual countdown duration before destruction is controlled by burnDuration; see Set burn duration. This setting is independent of server-side scheduled message destruction.
State changes after the call
Multi-device synchronization and arriving changes trigger conversation change events. The client updates isPrivateChat on the local conversation model using conversationID as the merge key. For complete listener integration, see Retrieve conversation list.
Was this page helpful?