SDKsuni-app
Set group extra data
OpenIM uni-app / uni-app x SDK guide for Set group extra data.
Use setGroupInfo() to replace the group's ex string. Read and merge the current versioned schema before writing.
import { setGroupInfo } from '@/uni_modules/unix-openim-sdk'
await setGroupInfo({
groupID,
ex: JSON.stringify({
...previous,
projectID: 'project-42',
}),
})ex is a complete replacement. When several modules share it, use stable namespaces and preserve fields owned by the others. If parsing fails, keep the original value rather than overwriting it. Members allowed to read group profiles can see this data, so never store secrets.
After Promise success, merge the latest group profile from onGroupInfoChanged by groupID or query it again.
Was this page helpful?