diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/network/RequestSender.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/network/RequestSender.kt index 5b9e2463ae..6907b7c64d 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/network/RequestSender.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/network/RequestSender.kt @@ -24,7 +24,6 @@ import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.SupervisorJob import kotlinx.coroutines.launch import org.matrix.android.sdk.api.auth.UserInteractiveAuthInterceptor -import org.matrix.android.sdk.api.extensions.tryOrNull import org.matrix.android.sdk.api.failure.Failure import org.matrix.android.sdk.api.failure.MatrixError import org.matrix.android.sdk.api.session.crypto.keysbackup.KeysBackupLastVersionResult @@ -37,7 +36,6 @@ import org.matrix.android.sdk.api.session.events.model.Event import org.matrix.android.sdk.api.session.events.model.EventType import org.matrix.android.sdk.api.session.uia.UiaResult import org.matrix.android.sdk.internal.auth.registration.handleUIA -import org.matrix.android.sdk.internal.crypto.OlmMachine import org.matrix.android.sdk.internal.crypto.PerSessionBackupQueryRateLimiter import org.matrix.android.sdk.internal.crypto.keysbackup.model.rest.BackupKeysResult import org.matrix.android.sdk.internal.crypto.keysbackup.model.rest.CreateKeysBackupVersionBody @@ -59,7 +57,6 @@ import org.matrix.android.sdk.internal.crypto.model.rest.KeysUploadBody import org.matrix.android.sdk.internal.crypto.model.rest.KeysUploadResponse import org.matrix.android.sdk.internal.crypto.model.rest.RestKeyInfo import org.matrix.android.sdk.internal.crypto.model.rest.SignatureUploadResponse -import org.matrix.android.sdk.internal.crypto.store.IMXCommonCryptoStore import org.matrix.android.sdk.internal.crypto.tasks.ClaimOneTimeKeysForUsersDeviceTask import org.matrix.android.sdk.internal.crypto.tasks.DefaultSendVerificationMessageTask import org.matrix.android.sdk.internal.crypto.tasks.DownloadKeysForUsersTask @@ -103,9 +100,7 @@ internal class RequestSender @Inject constructor( private val moshi: Moshi, cryptoCoroutineScope: CoroutineScope, private val rateLimiter: PerSessionBackupQueryRateLimiter, - private val cryptoStore: IMXCommonCryptoStore, private val localEchoRepository: LocalEchoRepository, - private val olmMachine: Lazy ) { private val scope = CoroutineScope( @@ -264,15 +259,8 @@ internal class RequestSender @Inject constructor( val requestBody = hashMap["body"] as? Map<*, *> val roomId = requestBody?.get("room_id") as? String val sessionId = requestBody?.get("session_id") as? String - val senderKey = requestBody?.get("sender_key") as? String if (roomId != null && sessionId != null) { - // try to perform a lazy migration from legacy store - val legacy = tryOrNull("Failed to access legacy crypto store") { - cryptoStore.getInboundGroupSession(sessionId, senderKey.orEmpty()) - } - if (legacy == null || olmMachine.get().importRoomKey(legacy).isFailure) { - rateLimiter.tryFromBackupIfPossible(sessionId, roomId) - } + rateLimiter.tryFromBackupIfPossible(sessionId, roomId) } } } diff --git a/vector-app/build.gradle b/vector-app/build.gradle index 72e04ed147..893d429c24 100644 --- a/vector-app/build.gradle +++ b/vector-app/build.gradle @@ -33,15 +33,11 @@ knit { // Note: 2 digits max for each value ext.versionMajor = 2 -ext.versionMinor = 13 +ext.versionMinor = 14 // Note: even values are reserved for regular release, odd values for hotfix release. // When creating a hotfix, you should decrease the value, since the current value // is the value for the next regular release. -<<<<<<< HEAD -ext.versionPatch = 4 -======= -ext.versionPatch = 22 ->>>>>>> v1.6.22 +ext.versionPatch = 0 static def getGitTimestamp() { def cmd = 'git show -s --format=%ct' diff --git a/vector/build.gradle b/vector/build.gradle index f81adac3fd..7dc1b2d71c 100644 --- a/vector/build.gradle +++ b/vector/build.gradle @@ -283,11 +283,7 @@ dependencies { // WebRTC withdmvoipImplementation('com.github.tchapgouv:webrtc:124.2.0') // Jitsi -<<<<<<< HEAD - withvoipApi('org.jitsi.react:jitsi-meet-sdk:8.1.1') { -======= - api('org.jitsi.react:jitsi-meet-sdk:10.2.0') { ->>>>>>> v1.6.22 + withvoipApi('org.jitsi.react:jitsi-meet-sdk:10.2.0') { exclude group: 'com.google.firebase' exclude group: 'com.google.android.gms' exclude group: 'com.android.installreferrer' diff --git a/vector/src/main/java/im/vector/app/features/VectorFeatures.kt b/vector/src/main/java/im/vector/app/features/VectorFeatures.kt index bc07a7b515..275f5e21ae 100644 --- a/vector/src/main/java/im/vector/app/features/VectorFeatures.kt +++ b/vector/src/main/java/im/vector/app/features/VectorFeatures.kt @@ -81,12 +81,6 @@ class DefaultVectorFeatures @Inject constructor( override fun isLocationSharingEnabled() = Config.ENABLE_LOCATION_SHARING override fun forceUsageOfOpusEncoder(): Boolean = false override fun isNewAppLayoutFeatureEnabled(): Boolean = true -<<<<<<< HEAD - override fun isQrCodeLoginEnabled(): Boolean = false // TCHAP disable QrCode login for now - override fun isQrCodeLoginForAllServers(): Boolean = false - override fun isReciprocateQrCodeLogin(): Boolean = false -======= ->>>>>>> v1.6.22 override fun isVoiceBroadcastEnabled(): Boolean = true override fun isUnverifiedSessionsAlertEnabled(): Boolean = true } diff --git a/vector/src/main/java/im/vector/app/features/onboarding/OnboardingViewModel.kt b/vector/src/main/java/im/vector/app/features/onboarding/OnboardingViewModel.kt index 2090b43d49..bf584f2dfc 100644 --- a/vector/src/main/java/im/vector/app/features/onboarding/OnboardingViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/onboarding/OnboardingViewModel.kt @@ -131,35 +131,9 @@ class OnboardingViewModel @AssistedInject constructor( } } -<<<<<<< HEAD - private fun checkQrCodeLoginCapability() { - if (!vectorFeatures.isQrCodeLoginEnabled()) { - setState { - copy( - canLoginWithQrCode = false - ) - } - } else if (vectorFeatures.isQrCodeLoginForAllServers()) { - // allow for all servers - setState { - copy( - canLoginWithQrCode = true - ) - } - } else { - setState { - copy( - canLoginWithQrCode = selectedHomeserver.isLoginWithQrSupported - ) - } - } - } - // TCHAP private var currentHomeServerConnectionConfig: HomeServerConnectionConfig? = null -======= ->>>>>>> v1.6.22 private val matrixOrgUrl = stringProvider.getString(im.vector.app.config.R.string.matrix_org_server_url).ensureTrailingSlash() private val defaultHomeserverUrl = mdmService.getData(MdmData.DefaultHomeserverUrl, matrixOrgUrl) diff --git a/vector/src/test/java/im/vector/app/features/onboarding/OnboardingViewModelTest.kt b/vector/src/test/java/im/vector/app/features/onboarding/OnboardingViewModelTest.kt index 422a7362c1..19f1969a36 100644 --- a/vector/src/test/java/im/vector/app/features/onboarding/OnboardingViewModelTest.kt +++ b/vector/src/test/java/im/vector/app/features/onboarding/OnboardingViewModelTest.kt @@ -192,7 +192,6 @@ class OnboardingViewModelTest { // TCHAP unit test @Test -<<<<<<< HEAD fun `given combined login enabled, when handling sign in splash action, then emits Tchap sign in`() = runTest { val test = viewModel.test() fakeVectorFeatures.givenCombinedLoginEnabled() @@ -210,31 +209,6 @@ class OnboardingViewModelTest { } @Test - @Ignore("Tchap: this flow does not exist anymore in Tchap") - fun `given combined login enabled, when handling sign in splash action, then emits OpenCombinedLogin with default homeserver qrCode supported`() = runTest { - val test = viewModel.test() - fakeVectorFeatures.givenCombinedLoginEnabled() - givenCanSuccessfullyUpdateHomeserver(A_DEFAULT_HOMESERVER_URL, DEFAULT_SELECTED_HOMESERVER_STATE_WITH_QR_SUPPORTED) - - viewModel.handle(OnboardingAction.SplashAction.OnIAlreadyHaveAnAccount(OnboardingFlow.SignIn)) - - test - .assertStatesChanges( - initialState, - { copy(onboardingFlow = OnboardingFlow.SignIn) }, - { copy(isLoading = true) }, - { copy(selectedHomeserver = DEFAULT_SELECTED_HOMESERVER_STATE_WITH_QR_SUPPORTED) }, - { copy(signMode = SignMode.SignIn) }, - { copy(canLoginWithQrCode = true) }, - { copy(isLoading = false) } - ) - .assertEvents(OnboardingViewEvents.OpenCombinedLogin) - .finish() - } - - @Test -======= ->>>>>>> v1.6.22 fun `given can successfully login in with token, when logging in with token, then emits AccountSignedIn`() = runTest { val test = viewModel.test() fakeAuthenticationService.givenLoginWizard(fakeLoginWizard)