mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-16 02:05:06 +08:00
Ensure OTK are uploaded when we upload the device keys
The sync response can omit the field device_one_time_keys_count.signed_curve25519 and the SDK was waiting to know this value to upload the OTK. Now the SDK uploads the OTK when it uploads the device keys.
This commit is contained in:
parent
2070b0ecde
commit
be488ae75a
@ -314,6 +314,12 @@ internal class DefaultCryptoService @Inject constructor(
|
||||
cryptoCoroutineScope.launchToCallback(coroutineDispatchers.crypto, NoOpMatrixCallback()) {
|
||||
// Open the store
|
||||
cryptoStore.open()
|
||||
|
||||
if (!cryptoStore.getDeviceKeysUploaded()) {
|
||||
// Schedule upload of OTK
|
||||
oneTimeKeysUploader.updateOneTimeKeyCount(0)
|
||||
}
|
||||
|
||||
// this can throw if no network
|
||||
tryOrNull {
|
||||
uploadDeviceKeys()
|
||||
|
Loading…
Reference in New Issue
Block a user