Browse SDKs · WASM
SDKsWASM

Set a local message extension

Update a message extension stored only on the current client with the WASM SDK.

Copy

localEx is stored only on the current client. Use it for presentation state such as collapsed, selected, or local-source markers. It is not synchronized to other users or devices.

Parameters

ParameterTypeRequiredDescription
conversationIDstringYesID of the conversation containing the target message.
clientMsgIDstringYesID of the target message.
localExstringYesComplete string to write.
await openimsdk.setMessageLocalEx({
  conversationID,
  clientMsgID,
  localEx: JSON.stringify({ selected: true }),
});

When the Promise resolves, the local data has been updated. The method does not merge existing JSON automatically and does not trigger shared message events. If existing fields must be preserved, merge them in your application before writing.