Browse SDKs · uni-app / uni-app x
SDKsuni-app

Set member friend request permission

OpenIM uni-app / uni-app x SDK guide for Set member friend request permission.

Copy

Use setGroupInfo() to control whether a user can start a friend application from the group-member relationship.

import { setGroupInfo } from '@/uni_modules/unix-openim-sdk'

await setGroupInfo({ groupID, applyMemberFriend: 1 })

The OpenIMGroupOption values are:

applyMemberFriendMeaning
0Allow friend applications through group membership.
1Disallow friend applications through group membership.

This policy controls only the friend-application entry from a group-member relationship; it is not the same as hiding member profiles. The server enforces it, so UI visibility is not an authorization boundary.

Promise success means that the update request completed. Merge the latest value from onGroupInfoChanged by groupID.