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

Delete a conversation

Delete a conversation entry from the authenticated user’s list while retaining underlying message history.

Copy

Invoke deleteConversation() to delete a conversation entry from the authenticated user's conversation list while preserving its local message history.

Parameters

ParameterTypeRequiredDescription
conversationIDstringYesIdentifier of the conversation to delete.

Code example

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

await deleteConversation(conversationID)

Return value

The Promise resolves with void upon successful completion.

State changes after the call

Promise resolution indicates that the conversation record was deleted locally and remotely. Immediately remove the item with matching conversationID from your visible conversation list. This operation does not affect friend status, nor does it quit or dismiss groups. If new incoming or outgoing messages occur for this chat target later, the SDK regenerates the conversation record. For conversation list state synchronization, see Retrieve conversation list.