ObservableMLSConversationRepository

internal class ObservableMLSConversationRepository(delegate: MLSConversationRepository, userId: UserId, hookNotifier: CryptoStateChangeHookNotifier) : MLSConversationRepository

Constructors

Link copied to clipboard
constructor(delegate: MLSConversationRepository, userId: UserId, hookNotifier: CryptoStateChangeHookNotifier)

Functions

Link copied to clipboard
open suspend override fun addMemberToMLSGroup(mlsContext: MlsCoreCryptoContext, groupID: GroupID, userIdList: List<UserId>, cipherSuite: CipherSuite, allowPartialMemberList: Boolean = false): Either<CoreFailure, MLSAdditionResult>
Link copied to clipboard
open suspend override fun clearProposalTimer(groupID: GroupID)
Link copied to clipboard
open suspend override fun commitPendingProposals(mlsContext: MlsCoreCryptoContext, groupID: GroupID): Either<CoreFailure, Unit>
Link copied to clipboard
open suspend override fun decryptMessage(mlsContext: MlsCoreCryptoContext, message: ByteArray, groupID: GroupID): Either<CoreFailure, List<DecryptedMessageBundle>>
Link copied to clipboard
open suspend override fun encryptMessage(mlsContext: MlsCoreCryptoContext, groupID: GroupID, content: ByteArray): Either<CoreFailure, ByteArray>
Link copied to clipboard
open suspend override fun establishMLSGroup(mlsContext: MlsCoreCryptoContext, groupID: GroupID, members: List<UserId>, publicKeys: MLSPublicKeys? = null, allowSkippingUsersWithoutKeyPackages: Boolean = false): Either<CoreFailure, MLSAdditionResult>

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

Link copied to clipboard
open suspend override fun establishMLSSubConversationGroup(mlsContext: MlsCoreCryptoContext, groupID: GroupID, parentId: ConversationId): Either<CoreFailure, Unit>
Link copied to clipboard
open suspend override fun getClientIdentity(mlsContext: MlsCoreCryptoContext, clientId: ClientId): Either<CoreFailure, WireIdentity?>
Link copied to clipboard
open suspend override fun getLocalGroupEpoch(mlsContext: MlsCoreCryptoContext, groupID: GroupID): Either<CoreFailure, ULong>
Link copied to clipboard
open suspend override fun getMembersIdentities(mlsClient: MLSClient, conversationId: ConversationId, userIds: List<UserId>): Either<CoreFailure, Map<UserId, List<WireIdentity>>>
open suspend override fun getMLSGroupsRequiringKeyingMaterialUpdate(threshold: Duration): Either<CoreFailure, List<GroupID>>
Link copied to clipboard
open suspend override fun getUserIdentity(mlsContext: MlsCoreCryptoContext, userId: UserId): Either<CoreFailure, List<WireIdentity>>
Link copied to clipboard
open suspend override fun hasEstablishedMLSGroup(mlsContext: MlsCoreCryptoContext, groupID: GroupID): Either<MLSFailure, Boolean>
Link copied to clipboard
open suspend override fun isLocalGroupEpochStale(mlsContext: MlsCoreCryptoContext, groupID: GroupID, currentRemoteEpoch: ULong): Either<CoreFailure, Boolean>

Determines whether the known group epoch is stale (outdated), when compared to the provided epoch.

Link copied to clipboard
open suspend override fun joinGroupByExternalCommit(mlsContext: MlsCoreCryptoContext, groupID: GroupID, groupInfo: ByteArray): Either<CoreFailure, Unit>
Link copied to clipboard
open suspend override fun leaveGroup(mlsContext: MlsCoreCryptoContext, groupID: GroupID): Either<CoreFailure, Unit>
Link copied to clipboard
open suspend override fun migrateConversationCredential(mlsContext: MlsCoreCryptoContext, credentialRef: CryptoCredentialRef, groupID: GroupID)

Migrate groupID when it still uses another credential.

Link copied to clipboard
open override fun observeProposalTimers(): Flow<ProposalTimer>
Link copied to clipboard
open suspend override fun prepareX509KeyPackages(mlsContext: MlsCoreCryptoContext, credentialRef: CryptoCredentialRef): PreparedX509KeyPackages

Generate a replacement set of key packages for an installed credential.

Link copied to clipboard
open suspend override fun removeClientsFromMLSGroup(mlsContext: MlsCoreCryptoContext, groupID: GroupID, clientIdList: List<QualifiedClientID>): Either<CoreFailure, Unit>
Link copied to clipboard
open suspend override fun removeMembersFromMLSGroup(mlsContext: MlsCoreCryptoContext, groupID: GroupID, userIdList: List<UserId>): Either<CoreFailure, Unit>
Link copied to clipboard
open suspend override fun replaceX509KeyPackages(clientId: ClientId, preparedKeyPackages: PreparedX509KeyPackages): Either<E2EIFailure, Unit>

Replace backend key packages. This must run outside a Core Crypto transaction.

Link copied to clipboard
open suspend override fun setProposalTimer(timer: ProposalTimer, inMemory: Boolean = false)
Link copied to clipboard
open suspend override fun updateGroupIdAndState(conversationId: ConversationId, newGroupId: GroupID, newEpoch: Long, groupState: ConversationEntity.GroupState = ConversationEntity.GroupState.PENDING_JOIN): Either<CoreFailure, Unit>
Link copied to clipboard
open suspend override fun updateKeyingMaterial(mlsContext: MlsCoreCryptoContext, groupID: GroupID): Either<CoreFailure, Unit>