SDKsWASM
Delete a conversation and its messages
Delete a selected conversation and all of its messages with the WASM SDK.
When the product action means “Delete this chat,” use deleteConversationAndDeleteAllMsg() to delete both the conversation record and the current account's messages in that conversation.
await openimsdk.deleteConversationAndDeleteAllMsg(conversationID);After the Promise succeeds, immediately clear the current message list and conversation-list item. Success does not mean that CbEvents.OnConversationChanged has arrived. Merge a later event by conversationID or query again to reconcile. This operation does not delete a friendship, leave a group, or affect another user's data.
Was this page helpful?