Use VerificationState.VERIFIED as soon as it's available (#5973)
This can't be a false positive like `VerificationState.UNKNOWN` or `VerificationState.UNVERIFIED`, so it makes sense to return it as fast as possible instead of waiting for the whole encryption layer to be fully loaded.
This commit is contained in:
parent
7186044482
commit
8955fb18ae
1 changed files with 2 additions and 1 deletions
|
|
@ -72,7 +72,8 @@ class RustSessionVerificationService(
|
|||
// Listen for changes in verification status and update accordingly
|
||||
private val verificationStateListenerTaskHandle = encryptionService.verificationStateListener(object : VerificationStateListener {
|
||||
override fun onUpdate(status: VerificationState) {
|
||||
if (!isInitialized.get()) {
|
||||
// If the status is verified, just use it. It can't be a false positive like unknown or unverified
|
||||
if (!isInitialized.get() && status != VerificationState.VERIFIED) {
|
||||
Timber.d("Discarding new verifications state: $status. E2EE is not initialised yet")
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue