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
3968bb82aa
commit
541c157034
1 changed files with 11 additions and 0 deletions
|
|
@ -96,6 +96,17 @@ class RustSessionVerificationService(
|
||||||
|
|
||||||
private var listener: SessionVerificationServiceListener? = null
|
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?) {
|
override fun setListener(listener: SessionVerificationServiceListener?) {
|
||||||
this.listener = listener
|
this.listener = listener
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue