diff --git a/logic/src/commonMain/kotlin/com/wire/kalium/logic/data/conversation/MLSConversationRepository.kt b/logic/src/commonMain/kotlin/com/wire/kalium/logic/data/conversation/MLSConversationRepository.kt index 7a1dbac50fc..be8a91d8f76 100644 --- a/logic/src/commonMain/kotlin/com/wire/kalium/logic/data/conversation/MLSConversationRepository.kt +++ b/logic/src/commonMain/kotlin/com/wire/kalium/logic/data/conversation/MLSConversationRepository.kt @@ -474,12 +474,17 @@ internal class MLSConversationDataSource( allowPartialMemberList: Boolean = false, ): Either = withContext(serialDispatcher) { commitPendingProposals(groupID).flatMap { - kaliumLogger.d("adding $userIdList to MLS group: $groupID") + kaliumLogger.d("adding ${userIdList.count()} users to MLS group") produceAndSendCommitWithRetryAndResult(groupID, retryOnStaleMessage = retryOnStaleMessage) { keyPackageRepository.claimKeyPackages(userIdList, cipherSuite).flatMap { result -> if (result.usersWithoutKeyPackagesAvailable.isNotEmpty() && !allowPartialMemberList) { + kaliumLogger.d( + "add members to MLS Group: failed " + + "${result.usersWithoutKeyPackagesAvailable.count()} user(s) missing KeyPackages" + ) Either.Left(CoreFailure.MissingKeyPackages(result.usersWithoutKeyPackagesAvailable)) } else { + kaliumLogger.d("add members to MLS Group: claiming KeyPackages succeed") Either.Right(result) } }.flatMap { result -> diff --git a/logic/src/commonMain/kotlin/com/wire/kalium/logic/feature/mlsmigration/MLSMigrator.kt b/logic/src/commonMain/kotlin/com/wire/kalium/logic/feature/mlsmigration/MLSMigrator.kt index 228e7c5ec5e..d3056300495 100644 --- a/logic/src/commonMain/kotlin/com/wire/kalium/logic/feature/mlsmigration/MLSMigrator.kt +++ b/logic/src/commonMain/kotlin/com/wire/kalium/logic/feature/mlsmigration/MLSMigrator.kt @@ -138,7 +138,11 @@ internal class MLSMigratorImpl( when (protocolInfo) { is Conversation.ProtocolInfo.Mixed -> { conversationRepository.getConversationMembers(conversationId).flatMap { members -> - mlsConversationRepository.establishMLSGroup(protocolInfo.groupId, members) + mlsConversationRepository.establishMLSGroup( + protocolInfo.groupId, + members, + allowSkippingUsersWithoutKeyPackages = true + ) } Unit.right() }