Clear all local messages
Clear every local message for the current account with the WASM SDK.
This operation clears every local message for the current account on the current device. Use it only for an explicit action such as “Clear messages on this device.” It has no application parameters, and its scope is not limited to the open conversation.
await openimsdk.deleteAllMsgFromLocal();
resetAllMessages();This is an irreversible account-level local operation, so require confirmation. When the Promise resolves, the local database on the current device has been cleared. Then clear the current account's in-memory message lists, search results, and pagination state. The server still retains message history, so messages may be synchronized again after a new login, a local database rebuild, or another synchronization. The operation does not notify other devices or conversation members and does not trigger a separate message-deletion event.
Was this page helpful?