Set conversation extension
Configure custom business extension strings for a specified conversation using the OpenIM Flutter SDK.
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
| Parameter | Type | Required | Description |
|---|---|---|---|
conversationID | String | Yes | Target conversation ID. |
req | ConversationReq | Yes | Conversation 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.
Was this page helpful?