Remove unneeded lax check

This commit is contained in:
Valere 2021-11-30 17:50:41 +01:00
parent 2e71f38f00
commit dc9f6b866b
2 changed files with 1 additions and 19 deletions

View file

@ -70,15 +70,4 @@ data class MegolmSessionData(
*/
@Json(name = "forwarding_curve25519_key_chain")
val forwardingCurve25519KeyChain: List<String>? = null
) {
fun isValid(): Boolean {
return roomId != null &&
forwardingCurve25519KeyChain != null &&
algorithm != null &&
senderKey != null &&
senderClaimedKeys != null &&
sessionId != null &&
sessionKey != null
}
}
)

View file

@ -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")
}
}
}
}
}
}