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

Set a local message extension

OpenIM uni-app / uni-app x SDK guide for Set a local message extension.

Copy

localEx is stored only on this client. Use it for collapsed, selected, or local-source display state, not for data that must synchronize.

Parameters

ParameterTypeRequiredDescription
conversationIDstringYesConversation containing the message.
clientMsgIDstringYesTarget message ID.
localExstringYesComplete replacement string.
import { setMessageLocalEx } from '@/uni_modules/unix-openim-sdk'

await setMessageLocalEx({ conversationID, clientMsgID, localEx: JSON.stringify(localState) })

The Promise means the local value was updated. The method does not merge old JSON and emits no shared message event. Merge and version data in the application when old fields must survive, constrain size, and store no tokens or irreplaceable business data.