SDKsAndroid
Set member friend request permission
Use GroupInfo.applyMemberFriend to control whether users can send friend requests from the group member list.
applyMemberFriend is an integer switch: 0 disables friend requests and 1 enables them. This rule only affects requests initiated through the member relationship in this group.
GroupInfo update = new GroupInfo();
update.setGroupID(groupID);
update.setApplyMemberFriend(0);
OpenIMClient.getInstance().groupManager.setGroupInfo(update, new OnBase<String>() {
@Override public void onSuccess(String data) { /* The request completed. */ }
@Override public void onError(int code, String error) { /* code and error describe the failure. */ }
});Was this page helpful?