Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: handle mls disabled error [WPB-15022] #3752

Merged
merged 1 commit into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading