SDKsWASM
Clear messages in a conversation
Keep a conversation entry while clearing its messages with the WASM SDK.
When the product action means “Clear chat history,” call clearConversationAndDeleteAllMsg(). This operation keeps the conversation entry while clearing the current account's messages and message-summary state.
await openimsdk.clearConversationAndDeleteAllMsg(conversationID);After the Promise succeeds, immediately clear the current message list. Then use CbEvents.OnConversationChanged or a new query to reconcile the latest message, summary, and unread state. See Get the conversation list for complete event handling.
Was this page helpful?