Instantiate the verification controller ASAP (#3893)
* Instantiate the verification controller when possible This is needed to get incoming verification requests * Workaround test failure
This commit is contained in:
parent
b06699e53e
commit
6bce3d513d
1 changed files with 11 additions and 0 deletions
|
|
@ -96,6 +96,17 @@ class RustSessionVerificationService(
|
|||
|
||||
private var listener: SessionVerificationServiceListener? = null
|
||||
|
||||
init {
|
||||
// Instantiate the verification controller when possible, this is needed to get incoming verification requests
|
||||
sessionCoroutineScope.launch {
|
||||
// Needed to avoid crashes on unit tests due to the Rust SDK not being available
|
||||
tryOrNull {
|
||||
encryptionService.waitForE2eeInitializationTasks()
|
||||
initVerificationControllerIfNeeded()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun setListener(listener: SessionVerificationServiceListener?) {
|
||||
this.listener = listener
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue