Browse SDKs · WASM
SDKsWASM

Set a group member extension

Set the application-defined extension string for a specified group member.

Copy
const previous = JSON.parse(member.ex || '{}');

await openimsdk.setGroupMemberInfo({
  groupID,
  userID: targetUserID,
  ex: JSON.stringify({
    ...previous,
    title: 'maintainer',
  }),
});

ex is written as a complete string; the SDK does not merge JSON automatically. Preserve the namespaces owned by other application modules before writing a new value.

After the Promise resolves, merge the subsequent OnGroupMemberInfoChanged update by groupID:userID. For the complete listener implementation, see List group members.