SDKsReact Native
Delete local message
Delete a single message from the current device local storage using the OpenIM React Native SDK.
Delete a single message from local device storage for a specified conversation:
await OpenIMSDK.deleteMessageFromLocalStorage({
conversationID,
clientMsgID,
});Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
conversationID | string | Yes | Conversation ID containing the message. |
clientMsgID | string | Yes | Client message ID to delete locally. |
Return value
A resolved Promise confirms that the target message has been removed from the local database on this device.
This operation alters only local device data; it is not uploaded to the server, does not synchronize to other devices, and does not trigger remote deletion events. Remove the message from the local UI view using clientMsgID within the scope of conversationID. To synchronize message deletion across multiple devices or conversation participants, see Delete saved messages.
Was this page helpful?