Store the first provider even if no distributor is available, else error in troubleshoot test will not be accurate.
Also when registering for the first time, pick the fist available provider with at least one distributor.
This commit is contained in:
parent
90eeb6cdb1
commit
622cc35616
4 changed files with 33 additions and 2 deletions
|
|
@ -73,6 +73,15 @@ class DefaultPushService @Inject constructor(
|
|||
return pushProvider.registerWith(matrixClient, distributor)
|
||||
}
|
||||
|
||||
override suspend fun selectPushProvider(
|
||||
matrixClient: MatrixClient,
|
||||
pushProvider: PushProvider,
|
||||
) {
|
||||
Timber.d("Select ${pushProvider.name}")
|
||||
val userPushStore = userPushStoreFactory.getOrCreate(matrixClient.sessionId)
|
||||
userPushStore.setPushProviderName(pushProvider.name)
|
||||
}
|
||||
|
||||
override fun ignoreRegistrationError(sessionId: SessionId): Flow<Boolean> {
|
||||
return userPushStoreFactory.getOrCreate(sessionId).ignoreRegistrationError()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue