Browse SDKs · React Native
SDKsReact Native

Set conversation extra data

Set the conversation extension string.

Copy

Use setConversation() to set the conversation extension field ex.

await OpenIMSDK.setConversation({
  conversationID,
  ex: JSON.stringify({
    category: 'work',
  }),
});

Parameters

ParameterTypeRequiredDescription
conversationIDstringYesConversation ID to update.
exstringNoConversation extension string. Pass a JSON string or another format of extension data as needed by the application.

If existing extension data must be preserved, read the current ex, update it according to the application's rules, and write the complete value back.

Return result

After the call completes, the conversation's ex is updated. Changes in the conversation list are delivered through OnConversationChanged; see Retrieve the conversation list.