Push distributor: ensure the current UnifiedPush distributor is stored
This commit is contained in:
parent
56ca04affa
commit
d2fbff09b8
8 changed files with 68 additions and 8 deletions
|
|
@ -16,6 +16,14 @@
|
|||
|
||||
package io.element.android.libraries.pushproviders.api
|
||||
|
||||
/**
|
||||
* Firebase does not have the concept of distributor. So for Firebase, there will be one distributor:
|
||||
* Distributor("Firebase", "Firebase").
|
||||
*
|
||||
* For UnifiedPush, for instance, the Distributor can be:
|
||||
* Distributor("io.heckel.ntfy", "ntfy").
|
||||
* But other values are possible.
|
||||
*/
|
||||
data class Distributor(
|
||||
val value: String,
|
||||
val name: String,
|
||||
|
|
|
|||
|
|
@ -44,6 +44,11 @@ interface PushProvider {
|
|||
*/
|
||||
suspend fun registerWith(matrixClient: MatrixClient, distributor: Distributor)
|
||||
|
||||
/**
|
||||
* Return the current distributor, or null if none.
|
||||
*/
|
||||
suspend fun getCurrentDistributor(matrixClient: MatrixClient): Distributor?
|
||||
|
||||
/**
|
||||
* Unregister the pusher.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue