The removeMembersExceptList method is used to remove all members of the Group except the list of group members. Calling member is not removed from the group. Any existing member of the group can remove other members. The developer can choose to build stricter access-control mechanisms on top of this if desired (e.g. only the group-owner or group-admin is authorized to remove members from the group).
The function takes the following parameters :
groupId : GroupId of the group.
groupMembers : List<GroupMember> of GroupMemberNOT to be removed from the group. If the list is empty, all the members of the group are removed except the calling member.
removeCallingMember : Determines whether the calling member should be removed from the group or not.
success : Success block to be executed after group is successfully joined.
failure : Failure block to be executed if group could not be joined, returns BayunError.