Ensure keys & signature after rust migration

This commit is contained in:
valere 2023-05-11 10:48:10 +02:00
parent 421d996908
commit 7d9330b2ee
1 changed files with 9 additions and 0 deletions

View File

@ -266,6 +266,15 @@ internal class RustCryptoService @Inject constructor(
Timber.tag(loggerTag.value).v("Failed create an Olm machine: $throwable")
}
// After the initial rust migration the current keys & signature might not be there
// The session is then in an invalid state and can fire unexpected verify popups
// this will only do network request once.
cryptoCoroutineScope.launch(coroutineDispatchers.io) {
tryOrNull {
downloadKeysIfNeeded(listOf(myUserId), false)
}
}
// We try to enable key backups, if the backup version on the server is trusted,
// we're gonna continue backing up.
cryptoCoroutineScope.launch {