establishMLSGroup

open suspend override fun establishMLSGroup(groupID: <Error class: unknown class>, members: List<<Error class: unknown class>>, publicKeys: <Error class: unknown class>?, allowSkippingUsersWithoutKeyPackages: Boolean): Either<CoreFailure, MLSAdditionResult>

Establishes an MLS (Messaging Layer Security) group with the specified group ID and members.

Allows partial addition of members through the allowSkippingUsersWithoutKeyPackages parameter. If this parameter is set to true, users without key packages will be ignored and the rest will be added to the group.

Return

An instance of Either indicating the result of the operation. It can be either Either.Right if the group was successfully established, or Either.Left if an error occurred. If successful, returns Unit. Possible types of Either.Left are defined in the sealed interface CoreFailure.

Parameters

groupID

The ID of the group to be established. Must be of type GroupID.

members

The list of user IDs (of type UserId) to be added as members to the group.

allowSkippingUsersWithoutKeyPackages

Flag indicating whether to allow a partial member list in case of some users not having key packages available. Default value is false. If false, will return Either.Left containing CoreFailure.MissingKeyPackages for the missing users.