Set group member extension
Configure custom business extension strings for a group member using the OpenIM Flutter SDK.
Attach custom business extension strings to a group member (such as member titles, internal badge tags, or position markers):
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
groupID | String | Yes | Target group ID. |
userID | String | Yes | Target member user ID. |
ex | String | Yes | Custom extension string, typically formatted as a JSON string. |
Code example
await OpenIM.iMManager.groupManager.setGroupMemberInfo(
groupMembersInfo: SetGroupMemberInfo(
groupID: groupID,
userID: targetUserID,
ex: mergedExtensionJSON,
),
);The ex attribute is overwritten completely; the SDK does not merge nested JSON properties automatically. If storing multi-attribute data, read the existing extension value, merge properties in the application layer, and write back the entire serialized string.
Return value
A successful Future indicates that the member extension string has been updated on the server.
State changes after the call
Connected clients in the group receive member profile update events. The client updates the local member record using groupID:userID as the key. For complete listener integration, see Retrieving group members overview.
Was this page helpful?