SDKsWASM
Set conversation extra data
Set an application-defined extension string on one of the current user’s conversations.
Use ex to store custom conversation-level application data.
const previous = JSON.parse(conversation.ex || '{}');
await openimsdk.setConversation({
conversationID,
ex: JSON.stringify({
...previous,
category: 'work',
}),
});ex is a complete string; the SDK does not merge JSON automatically. If several modules share it, give each one a stable namespace and preserve data owned by the other modules before writing.
After the Promise succeeds, use conversationID to update the matching conversation when OnConversationChanged arrives. See Get the conversation list for the complete listener.
Was this page helpful?