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.
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
| Parameter | Type | Required | Description |
|---|---|---|---|
groupID | string | Yes | Target group ID to update. |
applyMemberFriend | AllowType | Yes | Policy controlling inter-member friend requests. |
Permission options:
| Enum value | Value | Description |
|---|---|---|
AllowType.Allowed | 0 | Members may send friend requests to fellow group members. |
AllowType.NotAllowed | 1 | Restrict 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.
Was this page helpful?