Give ability to configure the Firebase push gateway.

This commit is contained in:
Benoit Marty 2025-03-12 16:50:12 +01:00
parent 3ca624648b
commit cf60f943a8
10 changed files with 70 additions and 11 deletions

View file

@ -17,4 +17,6 @@ interface EnterpriseService {
fun semanticColorsLight(): SemanticColors
fun semanticColorsDark(): SemanticColors
fun firebasePushGateway(): String?
}

View file

@ -27,4 +27,6 @@ class DefaultEnterpriseService @Inject constructor() : EnterpriseService {
override fun semanticColorsLight(): SemanticColors = compoundColorsLight
override fun semanticColorsDark(): SemanticColors = compoundColorsDark
override fun firebasePushGateway(): String? = null
}

View file

@ -19,6 +19,7 @@ class FakeEnterpriseService(
private val defaultHomeserverResult: () -> String? = { A_FAKE_HOMESERVER },
private val semanticColorsLightResult: () -> SemanticColors = { lambdaError() },
private val semanticColorsDarkResult: () -> SemanticColors = { lambdaError() },
private val firebasePushGatewayResult: () -> String? = { lambdaError() },
) : EnterpriseService {
override suspend fun isEnterpriseUser(sessionId: SessionId): Boolean = simulateLongTask {
isEnterpriseUserResult(sessionId)
@ -36,6 +37,10 @@ class FakeEnterpriseService(
return semanticColorsDarkResult()
}
override fun firebasePushGateway(): String? {
return firebasePushGatewayResult()
}
companion object {
const val A_FAKE_HOMESERVER = "a_fake_homeserver"
}