Browse SDKs · WASM
Platform
SDKsWASM

Delete a conversation

Delete a selected conversation record with the WASM SDK.

Copy

deleteConversation() deletes only the selected conversation record for the current account. It does not delete messages in that conversation.

await openimsdk.deleteConversation(conversationID);

When the Promise resolves, remove the corresponding conversationID from the client's current conversation list. Note that this operation only affects the conversation entry in the list and does not unfriend the user or leave/dismiss the group. When this conversation receives new messages later, the system recreates and displays it automatically. To calibrate the list, call Retrieve the conversation list and use the latest query snapshot.