From dc9f6b866b11bf33729431e24ae55093d0989199 Mon Sep 17 00:00:00 2001 From: Valere Date: Tue, 30 Nov 2021 17:50:41 +0100 Subject: [PATCH] Remove unneeded lax check --- .../sdk/internal/crypto/MegolmSessionData.kt | 13 +------------ .../crypto/keysbackup/RustKeyBackupService.kt | 7 ------- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/MegolmSessionData.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/MegolmSessionData.kt index d3100ede7d..caff2d76f1 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/MegolmSessionData.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/MegolmSessionData.kt @@ -70,15 +70,4 @@ data class MegolmSessionData( */ @Json(name = "forwarding_curve25519_key_chain") val forwardingCurve25519KeyChain: List? = null -) { - - fun isValid(): Boolean { - return roomId != null && - forwardingCurve25519KeyChain != null && - algorithm != null && - senderKey != null && - senderClaimedKeys != null && - sessionId != null && - sessionKey != null - } -} +) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/keysbackup/RustKeyBackupService.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/keysbackup/RustKeyBackupService.kt index 5410ab07df..071e1995c2 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/keysbackup/RustKeyBackupService.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/keysbackup/RustKeyBackupService.kt @@ -507,13 +507,6 @@ internal class RustKeyBackupService @Inject constructor( async { slice.mapNotNull { pair -> decryptKeyBackupData(pair.second.value, pair.second.key, pair.first, recoveryKey) - ?.takeIf { sessionData -> - sessionData.isValid().also { - if (!it) { - Timber.w("restoreKeysWithRecoveryKey: malformed sessionData $sessionData") - } - } - } } } }