Skip to content

Commit

Permalink
fix: handle mls disabled error [WPB-15022] (#3752)
Browse files Browse the repository at this point in the history
  • Loading branch information
Garzas authored Dec 17, 2024
1 parent 41b7ca7 commit 21ee4fc
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,9 @@ class DebugDataOptionsViewModelImpl
}

is MLSKeyPackageCountResult.Failure.Generic -> {}
MLSKeyPackageCountResult.Failure.NotEnabled -> {
state = state.copy(mlsErrorMessage = "Not Enabled!")
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class DeviceDetailsViewModel @Inject constructor(
private val fingerprintUseCase: ClientFingerprintUseCase,
private val updateClientVerificationStatus: UpdateClientVerificationStatusUseCase,
private val observeUserInfo: ObserveUserInfoUseCase,
private val e2eiCertificate: GetMLSClientIdentityUseCase,
private val mlsClientIdentity: GetMLSClientIdentityUseCase,
private val breakSession: BreakSessionUseCase,
isE2EIEnabledUseCase: IsE2EIEnabledUseCase
) : SavedStateViewModel(savedStateHandle) {
Expand Down Expand Up @@ -134,7 +134,7 @@ class DeviceDetailsViewModel @Inject constructor(

private fun getE2eiCertificate() {
viewModelScope.launch {
state = e2eiCertificate(deviceId).fold({
state = mlsClientIdentity(deviceId).fold({
state.copy(isE2eiCertificateActivated = false, isLoadingCertificate = false)
}, { mlsClientIdentity ->
state.copy(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ class DeviceDetailsViewModelTest {
updateClientVerificationStatus = updateClientVerificationStatus,
currentUserId = currentUserId,
observeUserInfo = observeUserInfo,
e2eiCertificate = getE2eiCertificate,
mlsClientIdentity = getE2eiCertificate,
isE2EIEnabledUseCase = isE2EIEnabledUseCase,
breakSession = breakSession
)
Expand Down
2 changes: 1 addition & 1 deletion kalium
Submodule kalium updated 24 files
+1 βˆ’1 .github/workflows/label-pr.yml
+2 βˆ’1 data/src/commonMain/kotlin/com/wire/kalium/logic/data/message/MessageContent.kt
+2 βˆ’2 gradle/libs.versions.toml
+1 βˆ’0 logic/src/commonMain/kotlin/com/wire/kalium/logic/CoreFailure.kt
+5 βˆ’0 logic/src/commonMain/kotlin/com/wire/kalium/logic/data/client/MLSClientProvider.kt
+35 βˆ’25 logic/src/commonMain/kotlin/com/wire/kalium/logic/data/conversation/ConversationRepository.kt
+52 βˆ’45 logic/src/commonMain/kotlin/com/wire/kalium/logic/data/conversation/MLSConversationRepository.kt
+4 βˆ’2 logic/src/commonMain/kotlin/com/wire/kalium/logic/data/message/ProtoContentMapper.kt
+2 βˆ’1 logic/src/commonMain/kotlin/com/wire/kalium/logic/feature/UserSessionScope.kt
+4 βˆ’2 logic/src/commonMain/kotlin/com/wire/kalium/logic/feature/client/ClientScope.kt
+4 βˆ’4 logic/src/commonMain/kotlin/com/wire/kalium/logic/feature/client/IsAllowedToRegisterMLSClientUseCase.kt
+2 βˆ’1 logic/src/commonMain/kotlin/com/wire/kalium/logic/feature/conversation/ClearConversationContentUseCase.kt
+13 βˆ’4 logic/src/commonMain/kotlin/com/wire/kalium/logic/feature/keypackage/MLSKeyPackageCountUseCase.kt
+1 βˆ’0 .../src/commonMain/kotlin/com/wire/kalium/logic/sync/receiver/conversation/message/MLSMessageFailureHandler.kt
+10 βˆ’3 logic/src/commonMain/kotlin/com/wire/kalium/logic/sync/receiver/handler/ClearConversationContentHandler.kt
+44 βˆ’0 logic/src/commonTest/kotlin/com/wire/kalium/logic/data/client/MLSClientProviderTest.kt
+41 βˆ’0 logic/src/commonTest/kotlin/com/wire/kalium/logic/data/conversation/ConversationRepositoryTest.kt
+9 βˆ’8 logic/src/commonTest/kotlin/com/wire/kalium/logic/data/conversation/MLSConversationRepositoryTest.kt
+41 βˆ’9 logic/src/commonTest/kotlin/com/wire/kalium/logic/feature/keypackage/MLSKeyPackageCountUseCaseTest.kt
+212 βˆ’0 ...c/commonTest/kotlin/com/wire/kalium/logic/sync/receiver/conversation/ClearConversationContentHandlerTest.kt
+7 βˆ’0 .../src/commonTest/kotlin/com/wire/kalium/logic/util/arrangement/repository/UserConfigRepositoryArrangement.kt
+1 βˆ’1 ...-model/src/commonMain/kotlin/com/wire/kalium/network/api/authenticated/conversation/ConversationResponse.kt
+23 βˆ’2 network/src/commonTest/kotlin/com/wire/kalium/api/v0/user/client/ClientApiV0Test.kt
+1 βˆ’0 protobuf-codegen/src/main/proto/messages.proto

0 comments on commit 21ee4fc

Please sign in to comment.