New SDK: fix API break.

This commit is contained in:
Benoit Marty 2024-09-11 12:18:02 +02:00
parent 355621b0c7
commit 8056285776
2 changed files with 8 additions and 1 deletions

View File

@ -121,7 +121,8 @@ internal class PrepareToEncryptUseCase @Inject constructor(
HistoryVisibility.INVITED HistoryVisibility.INVITED
} else { } else {
HistoryVisibility.JOINED HistoryVisibility.JOINED
} },
errorOnVerifiedUserProblem = false,
) )
measureTimeMillis { measureTimeMillis {
keyShareLock.withLock { keyShareLock.withLock {

View File

@ -34,6 +34,7 @@ import org.matrix.rustcomponents.sdk.crypto.CryptoStoreException
import org.matrix.rustcomponents.sdk.crypto.Sas import org.matrix.rustcomponents.sdk.crypto.Sas
import org.matrix.rustcomponents.sdk.crypto.SasListener import org.matrix.rustcomponents.sdk.crypto.SasListener
import org.matrix.rustcomponents.sdk.crypto.SasState import org.matrix.rustcomponents.sdk.crypto.SasState
import timber.log.Timber
/** Class representing a short auth string verification flow. */ /** Class representing a short auth string verification flow. */
internal class SasVerification @AssistedInject constructor( internal class SasVerification @AssistedInject constructor(
@ -72,6 +73,11 @@ internal class SasVerification @AssistedInject constructor(
override fun state(): SasTransactionState { override fun state(): SasTransactionState {
return when (val state = innerState) { 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.Started -> SasTransactionState.SasStarted
SasState.Accepted -> SasTransactionState.SasAccepted SasState.Accepted -> SasTransactionState.SasAccepted
is SasState.KeysExchanged -> { is SasState.KeysExchanged -> {