From 8056285776507eb87e423d625921c7b2d71b201c Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 11 Sep 2024 12:18:02 +0200 Subject: [PATCH] New SDK: fix API break. --- .../android/sdk/internal/crypto/PrepareToEncryptUseCase.kt | 3 ++- .../sdk/internal/crypto/verification/SasVerification.kt | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/PrepareToEncryptUseCase.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/PrepareToEncryptUseCase.kt index e4c0469c74..72242d876c 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/PrepareToEncryptUseCase.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/PrepareToEncryptUseCase.kt @@ -121,7 +121,8 @@ internal class PrepareToEncryptUseCase @Inject constructor( HistoryVisibility.INVITED } else { HistoryVisibility.JOINED - } + }, + errorOnVerifiedUserProblem = false, ) measureTimeMillis { keyShareLock.withLock { diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/verification/SasVerification.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/verification/SasVerification.kt index 9c8e327cd5..54f99248b1 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/verification/SasVerification.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/verification/SasVerification.kt @@ -34,6 +34,7 @@ import org.matrix.rustcomponents.sdk.crypto.CryptoStoreException import org.matrix.rustcomponents.sdk.crypto.Sas import org.matrix.rustcomponents.sdk.crypto.SasListener import org.matrix.rustcomponents.sdk.crypto.SasState +import timber.log.Timber /** Class representing a short auth string verification flow. */ internal class SasVerification @AssistedInject constructor( @@ -72,6 +73,11 @@ internal class SasVerification @AssistedInject constructor( override fun state(): SasTransactionState { return when (val state = innerState) { + SasState.Created -> { + // Note: this does not seem to be used, but emit a warning just in case. + Timber.w("SasState.Created received") + SasTransactionState.None + } SasState.Started -> SasTransactionState.SasStarted SasState.Accepted -> SasTransactionState.SasAccepted is SasState.KeysExchanged -> {