Merge branch 'develop' into feature/fga/sending_queue_iteration

This commit is contained in:
ganfra 2024-06-19 13:54:24 +02:00 committed by GitHub
commit b874d3e38c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
31 changed files with 161 additions and 86 deletions

View file

@ -74,7 +74,7 @@ class MatrixClientsHolder @Inject constructor(private val authenticationService:
// Not ideal but should only happens in case of process recreation. This ensure we restore all the active sessions before restoring the node graphs.
runBlocking {
sessionIds.forEach { sessionId ->
restore(sessionId)
getOrRestore(sessionId)
}
}
}

View file

@ -40,7 +40,7 @@ class MatrixClientsHolderTest {
fakeAuthenticationService.givenMatrixClient(fakeMatrixClient)
assertThat(matrixClientsHolder.getOrNull(A_SESSION_ID)).isNull()
assertThat(matrixClientsHolder.getOrRestore(A_SESSION_ID).getOrNull()).isEqualTo(fakeMatrixClient)
// Do it again to it the cache
// Do it again to hit the cache
assertThat(matrixClientsHolder.getOrRestore(A_SESSION_ID).getOrNull()).isEqualTo(fakeMatrixClient)
assertThat(matrixClientsHolder.getOrNull(A_SESSION_ID)).isEqualTo(fakeMatrixClient)
}