PushersService

interface PushersService

Functions

Link copied to clipboard
abstract suspend fun addEmailPusher(    email: String,     lang: String,     emailBranding: String,     appDisplayName: String,     deviceDisplayName: String,     append: Boolean = true)

Add a new Email pusher. Ref: https://matrix.org/docs/spec/client_server/latest#post-matrix-client-r0-pushers-set

Link copied to clipboard
abstract suspend fun addHttpPusher(httpPusher: HttpPusher)

Add a new HTTP pusher. Ref: https://matrix.org/docs/spec/client_server/latest#post-matrix-client-r0-pushers-set

Link copied to clipboard
abstract fun enqueueAddHttpPusher(httpPusher: HttpPusher): UUID

Enqueues a new HTTP pusher via the WorkManager API. Ref: https://matrix.org/docs/spec/client_server/latest#post-matrix-client-r0-pushers-set

Link copied to clipboard
abstract fun getPushers(): List<Pusher>

Get the current pushers.

Link copied to clipboard
abstract fun getPushersLive(): LiveData<List<Pusher>>

Get the current pushers, as a LiveData.

Link copied to clipboard
abstract fun refreshPushers()

Refresh pushers from server state.

Link copied to clipboard
abstract suspend fun removeEmailPusher(email: String)

Remove an Email pusher.

Link copied to clipboard
abstract suspend fun removeHttpPusher(pushkey: String, appId: String)

Remove a Http pusher by its pushkey and appId.

Link copied to clipboard
abstract suspend fun removePusher(pusher: Pusher)

Remove a registered pusher.

Link copied to clipboard
abstract suspend fun testPush(    url: String,     appId: String,     pushkey: String,     eventId: String)

Directly ask the push gateway to send a push to this device. If successful, the push gateway has accepted the request. In this case, the app should receive a Push with the provided eventId. In case of error, PusherRejected will be thrown. In this case it means that the pushkey is not valid.

Link copied to clipboard
abstract suspend fun togglePusher(pusher: Pusher, enable: Boolean)

Enables or disables a registered pusher.