Browse SDKs · React Native
Platform
SDKsReact Native

Set group member friend permission

Configure whether members can send friend requests to each other from within a group using the OpenIM React Native SDK.

Copy

Control whether group members are permitted to send friend requests to each other directly from the group member card:

await OpenIMSDK.setGroupInfo({
  groupID,
  applyMemberFriend: AllowType.NotAllowed,
});

Parameters

ParameterTypeRequiredDescription
groupIDstringYesTarget group ID to update.
applyMemberFriendAllowTypeYesPolicy controlling inter-member friend requests.

Permission options:

Enum valueValueDescription
AllowType.Allowed0Members may send friend requests to fellow group members.
AllowType.NotAllowed1Restrict members from sending friend requests from within this group.

This setting controls the friend request shortcut inside the group and is independent of Set member profile access.

Return value

A resolved Promise confirms that the inter-member friendship policy was updated on the server.

The change triggers the OnGroupInfoChanged event. Use groupID to locate the group in your state store and update applyMemberFriend. For event details, see Group overview.