SDKsuni-app / uni-app x
Set group member nickname
Modify a member’s group-specific nickname within a designated group.
Invoke setGroupMemberInfo() to update a member's group-specific nickname. This alias applies strictly within the target group and does not modify the user's account-wide profile nickname.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
groupID | string | Yes | Target group identifier. |
userID | string | Yes | Target member user ID. |
nickname | string | Yes | New group-specific nickname. |
Code example
import { setGroupMemberInfo } from '@/uni_modules/unix-openim-sdk'
await setGroupMemberInfo({
groupID: groupID,
userID: targetUserID,
nickname: 'Project Lead',
})Return value
The Promise resolves with void once OpenIMServer updates the member nickname.
State changes after the call
A resolved Promise confirms that the request completed on OpenIMServer. Connected clients receive onGroupMemberInfoChanged, at which point the UI updates the member's group nickname matching groupID:userID. For complete member event handling, see Get group member list.
Was this page helpful?