Set group member profile access
Control whether regular group members can view profile cards of other members using setGroupInfo().
Control whether regular group members can inspect other members' personal profiles from the group roster. Group owners and administrators manage this restriction via the lookMemberInfo field on GroupInfo. This privacy safeguard prevents regular members from harvesting or viewing member profile cards.
Code example
GroupInfo update = new GroupInfo();
update.setGroupID("group_123");
update.setLookMemberInfo(0); // 0 disallows regular members from viewing other member profiles
OpenIMClient.getInstance().groupManager.setGroupInfo(
update,
new OnBase<String>() {
@Override
public void onSuccess(String data) {
// Permission updated successfully
}
@Override
public void onError(int code, String error) {
// Handle update failure
}
}
);Permission values
The lookMemberInfo field accepts the following integers:
| Mode | Value | Description |
|---|---|---|
| Disallow viewing profiles | 0 | Regular members cannot tap or view other members' personal profile cards (group owners and administrators remain exempt). |
| Allow viewing profiles | 1 | All group members can tap and view other members' profiles. |
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
groupInfo | GroupInfo | Yes | Group entity holding the target groupID and the updated lookMemberInfo integer. |
base | OnBase<String> | Yes | Callback delivering the asynchronous operation result. |
Return value
The successful callback confirms that the permission update was persisted on the server.
State changes after the call
Once updated, group members receive the onGroupInfoChanged(GroupInfo group) event via OnGroupListener. Merge the updated GroupInfo into local cache using groupID, and disable profile tap interactions in the group roster accordingly. For complete listener registration details, see Group overview.
Was this page helpful?