SDKsuni-app / uni-app x
Set group member avatar
Update a member’s group-specific avatar URL within a designated group.
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
| Parameter | Type | Required | Description |
|---|---|---|---|
groupID | string | Yes | Target group identifier. |
userID | string | Yes | Target member user ID. |
faceURL | string | Yes | New 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.
Was this page helpful?