Browse SDKs · uni-app / uni-app x
SDKsuni-app

Clear all local messages

OpenIM uni-app / uni-app x SDK guide for Clear all local messages.

Copy
import { deleteAllMsgFromLocal } from '@/uni_modules/unix-openim-sdk'

await deleteAllMsgFromLocal()

This high-risk operation clears all local messages for the current account. Require explicit confirmation and stop concurrent message queries before calling it. It does not guarantee deletion of server data, and later synchronization may restore some records. Rebuild the local message store after success and re-query after an ambiguous failure.