SDKsReact Native
Delete conversation with messages
Delete a conversation entry and permanently remove all its associated messages using the OpenIM React Native SDK.
Delete a conversation entry and purge all its associated messages for the current account:
await OpenIMSDK.deleteConversationAndDeleteAllMsg(conversationID);Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
conversationID | string | Yes | Target conversation ID to permanently delete. |
Return value
A resolved Promise confirms that the conversation record and its historical messages were removed locally and from the server.
The deletion triggers the OnConversationChanged event. Use conversationID to identify the conversation, remove it from local UI state lists, and purge the chat view message cache. For event listener registration, see Retrieve conversation list.
Was this page helpful?