MLSMessageApi

interface MLSMessageApi

Inheritors

Types

Link copied to clipboard
@JvmInline
value class CommitBundle(val value: ByteArray)

An commitBundle originated CommitBundle object. The CommitBundle object contains a welcome message can be null, a commit message and the groupInfo.

Link copied to clipboard
object Companion
Link copied to clipboard
@JvmInline
value class Message(val value: ByteArray)

An MLS message can either be an application message containing user content or a handshake message which updates the group state (adding, removing clients).

Link copied to clipboard
@JvmInline
value class TargetedMessageBatch(val value: ByteArray)

TLS-serialized targeted MLS messages concatenated into one batch, each addressed to a single client of the same conversation. Persistent and transient targeted messages share this format.

Link copied to clipboard
@JvmInline
value class TransientMessage(val value: ByteArray)

A TLS-serialized transient MLS message, broadcast to every client of a conversation. Transient messages are not stored by the backend.

Link copied to clipboard
@JvmInline
value class WelcomeMessage(val value: ByteArray)

A welcome message allows an MLS client to join an existing MLS group.

Functions

Link copied to clipboard
abstract suspend fun sendCommitBundle(bundle: MLSMessageApi.CommitBundle): NetworkResponse<SendMLSMessageResponse>

Send an MLS commit bundle to a MLS group. The destination group is encoded into the message itself.

Link copied to clipboard
abstract suspend fun sendMessage(message: ByteArray): NetworkResponse<SendMLSMessageResponse>

Send an MLS message to a MLS group. The destination group is encoded into the message itself.

Link copied to clipboard
abstract suspend fun sendTargetedMessage(batch: MLSMessageApi.TargetedMessageBatch): NetworkResponse<SendMLSMessageResponse>

Send a batch of persistent targeted MLS messages. The destination group and recipients are encoded into the batch itself.

Link copied to clipboard
abstract suspend fun sendTransientMessage(message: MLSMessageApi.TransientMessage): NetworkResponse<SendMLSMessageResponse>

Send a transient MLS message to a MLS group. The destination group is encoded into the message itself.

Link copied to clipboard
abstract suspend fun sendTransientTargetedMessage(batch: MLSMessageApi.TargetedMessageBatch): NetworkResponse<SendMLSMessageResponse>

Send a batch of transient targeted MLS messages. The destination group and recipients are encoded into the batch itself.