mirror of
https://github.com/element-hq/element-android
synced 2024-11-23 09:55:40 +03:00
Download device keys for self prior to verification checks
Fixes https://github.com/vector-im/element-android/issues/7676
This commit is contained in:
parent
de18f37849
commit
73fd93148a
1 changed files with 6 additions and 0 deletions
|
@ -35,7 +35,10 @@ import org.matrix.android.sdk.api.session.crypto.crosssigning.KEYBACKUP_SECRET_S
|
|||
import org.matrix.android.sdk.api.session.crypto.crosssigning.MASTER_KEY_SSSS_NAME
|
||||
import org.matrix.android.sdk.api.session.crypto.crosssigning.SELF_SIGNING_KEY_SSSS_NAME
|
||||
import org.matrix.android.sdk.api.session.crypto.crosssigning.USER_SIGNING_KEY_SSSS_NAME
|
||||
import org.matrix.android.sdk.api.session.crypto.model.CryptoDeviceInfo
|
||||
import org.matrix.android.sdk.api.session.crypto.model.MXUsersDevicesMap
|
||||
import org.matrix.android.sdk.api.util.MatrixJsonParser
|
||||
import org.matrix.android.sdk.api.util.awaitCallback
|
||||
import timber.log.Timber
|
||||
|
||||
/**
|
||||
|
@ -147,6 +150,9 @@ class Rendezvous(
|
|||
val deviceKey = crypto.getMyDevice().fingerprint()
|
||||
send(Payload(PayloadType.PROGRESS, outcome = Outcome.SUCCESS, deviceId = deviceId, deviceKey = deviceKey))
|
||||
|
||||
// explicitly download keys for ourself rather than wait for initial sync to complete
|
||||
awaitCallback<MXUsersDevicesMap<CryptoDeviceInfo>> { crypto.downloadKeys(listOf(userId), false, it) }
|
||||
|
||||
// await confirmation of verification
|
||||
val verificationResponse = receive()
|
||||
if (verificationResponse?.outcome == Outcome.VERIFIED) {
|
||||
|
|
Loading…
Reference in a new issue