Clear all local and remote messages
Delete all message history stored locally and on the server for the current account.
This operation affects all conversations belonging to the current account and is not intended as an action for individual messages or single conversations.
Code example
import sdk from '@openimsdk/imsdk';
await sdk.deleteAllMsgFromLocalAndServer();
resetAllMessageState();Parameters
This method does not take any parameters.
Return value
Returns a Promise that resolves to void upon server acceptance and local database completion.
State changes after the call
This is an irreversible account-wide operation. When the Promise resolves, clear all in-memory message feeds, search results, pagination states, and related caches for the current account. It does not delete copies held by other conversation participants, nor does it guarantee that other active devices of the current user have already refreshed their UI. To clear only local database records, see Clear all local messages; to clear messages within a specific conversation, see Clear conversation messages.
Was this page helpful?