Improve current push provider test: give info about the distributor.
This commit is contained in:
parent
9714abe032
commit
7ce4b47203
6 changed files with 165 additions and 15 deletions
|
|
@ -29,6 +29,7 @@ class UnifiedPushProvider(
|
|||
) : PushProvider {
|
||||
override val index = UnifiedPushConfig.INDEX
|
||||
override val name = UnifiedPushConfig.NAME
|
||||
override val supportMultipleDistributors = true
|
||||
|
||||
override fun getDistributors(): List<Distributor> {
|
||||
return unifiedPushDistributorProvider.getDistributors()
|
||||
|
|
@ -42,6 +43,10 @@ class UnifiedPushProvider(
|
|||
}
|
||||
}
|
||||
|
||||
override suspend fun getCurrentDistributorValue(sessionId: SessionId): String? {
|
||||
return unifiedPushStore.getDistributorValue(sessionId)
|
||||
}
|
||||
|
||||
override suspend fun getCurrentDistributor(sessionId: SessionId): Distributor? {
|
||||
val distributorValue = unifiedPushStore.getDistributorValue(sessionId)
|
||||
return getDistributors().find { it.value == distributorValue }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue