Browse SDKs · uni-app / uni-app x
SDKsuni-app

Update group profile

OpenIM uni-app / uni-app x SDK guide for Update group profile.

Copy

Use setGroupInfo() to update basic group profile fields. Pass only the values that actually changed.

Parameters

ParameterTypeRequiredDescription
groupIDstringYesGroup to update.
groupNamestring or nullNoNew group name.
introductionstring or nullNoNew introduction.
faceURLstring or nullNoNew avatar URL.

Provide at least one actual profile field besides groupID; omitted fields retain their values.

import { setGroupInfo } from '@/uni_modules/unix-openim-sdk'

await setGroupInfo({
  groupID,
  groupName: groupName.trim(),
  introduction: introduction.trim(),
  faceURL,
})

Do not mix announcement, join-verification, or member-permission fields into the ordinary profile-save flow; editing a name must not overwrite unrelated settings. The server enforces owner/admin permission.

Promise success means that OpenIMServer completed the request. Merge onGroupInfoChanged by groupID or call getSpecifiedGroupsInfo() for immediate reconciliation. Do not overwrite fields that were not submitted.

displayIsRead is an Enterprise field. Do not send it when the public server or installed edition does not expose the capability.