Browse SDKs · React Native
Platform
SDKsReact Native

Delete conversation with messages

Delete a conversation entry and permanently remove all its associated messages using the OpenIM React Native SDK.

Copy

Delete a conversation entry and purge all its associated messages for the current account:

await OpenIMSDK.deleteConversationAndDeleteAllMsg(conversationID);

Parameters

ParameterTypeRequiredDescription
conversationIDstringYesTarget 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.