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

Set group member avatar

Update a member’s group-specific avatar URL within a designated group.

Copy

Invoke setGroupMemberInfo() to update a member's group-specific avatar image URL. This avatar applies strictly within the designated group and does not modify the user's primary account avatar.

Parameters

ParameterTypeRequiredDescription
groupIDstringYesTarget group identifier.
userIDstringYesTarget member user ID.
faceURLstringYesNew avatar image URL for the group member.

To update the authenticated user's account-wide profile avatar, call Update your profile.

Code example

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

await setGroupMemberInfo({
  groupID: groupID,
  userID: targetUserID,
  faceURL: avatarURL,
})

Return value

The Promise resolves with void once OpenIMServer updates the member avatar.

State changes after the call

A resolved Promise confirms that the avatar change was accepted. Connected clients receive onGroupMemberInfoChanged, at which point the UI updates the member avatar matching groupID:userID. For complete member event handling, see Get group member list.