Browse SDKs · Flutter
Platform
SDKsFlutter

Set conversation extension

Configure custom business extension strings for a specified conversation using the OpenIM Flutter SDK.

Copy

Attach custom business extension strings to a specified conversation. The ex field is a plain text string that overwrites existing content on update; if storing structured data like JSON, read existing values first, merge attributes in the application layer, and then persist the updated string:

Parameters

ParameterTypeRequiredDescription
conversationIDStringYesTarget conversation ID.
reqConversationReqYesConversation modification request object. Pass the serialized extension string in ex.

Code example

await OpenIM.iMManager.conversationManager.setConversation(
  conversationID,
  ConversationReq(ex: mergedExtensionJSON),
);

Return value

A successful Future indicates that the extension string has been updated on the server.

State changes after the call

Multi-device synchronization and arriving changes trigger conversation change events. The client updates ex on the local conversation model using conversationID as the merge key. For complete listener integration, see Retrieve conversation list.