Browse SDKs · WASM
SDKsWASM

Set member friend request permission

Control whether group members can send friend applications to other members through the group.

Copy
import { AllowType } from '@openim/wasm-client-sdk';

await openimsdk.setGroupInfo({
  groupID,
  applyMemberFriend: AllowType.NotAllowed,
});
Enum valueNumeric valueMeaning
AllowType.Allowed0Allow friend applications through group membership.
AllowType.NotAllowed1Prevent friend applications through group membership.

This field controls only the entry point for friend applications based on group membership; it is not the same as hiding member profiles.

A successful Promise means that the setting request has completed. Merge the latest state from OnGroupInfoChanged by groupID; see Group overview for the complete listener.