Merge pull request #4925 from element-hq/feature/bma/elementCallCheck
Introduce SessionEnterpriseService.
This commit is contained in:
commit
6a088396ed
15 changed files with 95 additions and 20 deletions
|
|
@ -164,6 +164,11 @@ interface MatrixClient {
|
|||
* Check if the user can report a room.
|
||||
*/
|
||||
suspend fun canReportRoom(): Boolean
|
||||
|
||||
/**
|
||||
* Return true if Livekit Rtc is supported, i.e. if Element Call is available.
|
||||
*/
|
||||
suspend fun isLivekitRtcSupported(): Boolean
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -678,6 +678,10 @@ class RustMatrixClient(
|
|||
}.getOrDefault(false)
|
||||
}
|
||||
|
||||
override suspend fun isLivekitRtcSupported(): Boolean = withContext(sessionDispatcher) {
|
||||
innerClient.isLivekitRtcSupported()
|
||||
}
|
||||
|
||||
private suspend fun File.getCacheSize(
|
||||
includeCryptoDb: Boolean = false,
|
||||
): Long = withContext(sessionDispatcher) {
|
||||
|
|
|
|||
|
|
@ -89,6 +89,7 @@ class FakeMatrixClient(
|
|||
private val ignoreUserResult: (UserId) -> Result<Unit> = { lambdaError() },
|
||||
private var unIgnoreUserResult: (UserId) -> Result<Unit> = { Result.success(Unit) },
|
||||
private val canReportRoomLambda: () -> Boolean = { false },
|
||||
private val isLivekitRtcSupportedLambda: () -> Boolean = { false },
|
||||
override val ignoredUsersFlow: StateFlow<ImmutableList<UserId>> = MutableStateFlow(persistentListOf()),
|
||||
) : MatrixClient {
|
||||
var setDisplayNameCalled: Boolean = false
|
||||
|
|
@ -334,4 +335,8 @@ class FakeMatrixClient(
|
|||
override suspend fun canReportRoom(): Boolean {
|
||||
return canReportRoomLambda()
|
||||
}
|
||||
|
||||
override suspend fun isLivekitRtcSupported(): Boolean {
|
||||
return isLivekitRtcSupportedLambda()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue