Skip to content

Commit

Permalink
Instantiate the verification controller ASAP (#3893)
Browse files Browse the repository at this point in the history
* Instantiate the verification controller when possible

This is needed to get incoming verification requests

* Workaround test failure
  • Loading branch information
jmartinesp authored Nov 19, 2024
1 parent b06699e commit 6bce3d5
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 6bce3d5

Please sign in to comment.