mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-12-28 03:48:37 +03:00
Remove unneeded lax check
This commit is contained in:
parent
2e71f38f00
commit
dc9f6b866b
2 changed files with 1 additions and 19 deletions
|
@ -70,15 +70,4 @@ data class MegolmSessionData(
|
||||||
*/
|
*/
|
||||||
@Json(name = "forwarding_curve25519_key_chain")
|
@Json(name = "forwarding_curve25519_key_chain")
|
||||||
val forwardingCurve25519KeyChain: List<String>? = null
|
val forwardingCurve25519KeyChain: List<String>? = null
|
||||||
) {
|
)
|
||||||
|
|
||||||
fun isValid(): Boolean {
|
|
||||||
return roomId != null &&
|
|
||||||
forwardingCurve25519KeyChain != null &&
|
|
||||||
algorithm != null &&
|
|
||||||
senderKey != null &&
|
|
||||||
senderClaimedKeys != null &&
|
|
||||||
sessionId != null &&
|
|
||||||
sessionKey != null
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -507,13 +507,6 @@ internal class RustKeyBackupService @Inject constructor(
|
||||||
async {
|
async {
|
||||||
slice.mapNotNull { pair ->
|
slice.mapNotNull { pair ->
|
||||||
decryptKeyBackupData(pair.second.value, pair.second.key, pair.first, recoveryKey)
|
decryptKeyBackupData(pair.second.value, pair.second.key, pair.first, recoveryKey)
|
||||||
?.takeIf { sessionData ->
|
|
||||||
sessionData.isValid().also {
|
|
||||||
if (!it) {
|
|
||||||
Timber.w("restoreKeysWithRecoveryKey: malformed sessionData $sessionData")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue