OneOnOneMigratorImpl

internal class OneOnOneMigratorImpl(getResolvedMLSOneOnOne: MLSOneOnOneConversationResolver, conversationGroupRepository: ConversationGroupRepository, conversationRepository: ConversationRepository, messageRepository: MessageRepository, userRepository: UserRepository, systemMessageInserter: SystemMessageInserter, clientRemoteRepository: ClientRemoteRepository) : OneOnOneMigrator

Constructors

Link copied to clipboard
constructor(getResolvedMLSOneOnOne: MLSOneOnOneConversationResolver, conversationGroupRepository: ConversationGroupRepository, conversationRepository: ConversationRepository, messageRepository: MessageRepository, userRepository: UserRepository, systemMessageInserter: SystemMessageInserter, clientRemoteRepository: ClientRemoteRepository)

Functions

Link copied to clipboard
open suspend override fun migrateExistingProteus(user: OtherUser): Either<CoreFailure, ConversationId>

Migrates the user's one-on-one Proteus. Without creating a new one since MLS is the default, marking it as active.

Link copied to clipboard
open suspend override fun migrateToMLS(transactionContext: CryptoTransactionContext, user: OtherUser, allowJoinByExternalCommit: Boolean = true): Either<CoreFailure, ConversationId>

Perform migration of Proteus to MLS keeping history and marking the new conversation as active.

Link copied to clipboard
open suspend override fun migrateToProteus(user: OtherUser): Either<CoreFailure, ConversationId>

Get one-on-one conversation with the user, if not found, create a new one (Proteus still default) and mark it as active. New conversations require at least one registered recipient client; lookup failures are propagated.