mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-04 10:32:34 +00:00
Always register the pusher when application starts
This commit is contained in:
@@ -0,0 +1 @@
|
|||||||
|
Always register the pusher when application starts
|
||||||
+3
-4
@@ -63,9 +63,9 @@ class PushersManager @Inject constructor(
|
|||||||
override suspend fun registerPusher(matrixClient: MatrixClient, pushKey: String, gateway: String) {
|
override suspend fun registerPusher(matrixClient: MatrixClient, pushKey: String, gateway: String) {
|
||||||
val userDataStore = userPushStoreFactory.create(matrixClient.sessionId)
|
val userDataStore = userPushStoreFactory.create(matrixClient.sessionId)
|
||||||
if (userDataStore.getCurrentRegisteredPushKey() == pushKey) {
|
if (userDataStore.getCurrentRegisteredPushKey() == pushKey) {
|
||||||
Timber.tag(loggerTag.value).d("Unnecessary to register again the same pusher")
|
Timber.tag(loggerTag.value)
|
||||||
} else {
|
.d("Unnecessary to register again the same pusher, but do it in case the pusher has been removed from the server")
|
||||||
// Register the pusher to the server
|
}
|
||||||
matrixClient.pushersService().setHttpPusher(
|
matrixClient.pushersService().setHttpPusher(
|
||||||
createHttpPusher(pushKey, gateway, matrixClient.sessionId)
|
createHttpPusher(pushKey, gateway, matrixClient.sessionId)
|
||||||
).fold(
|
).fold(
|
||||||
@@ -77,7 +77,6 @@ class PushersManager @Inject constructor(
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private suspend fun createHttpPusher(
|
private suspend fun createHttpPusher(
|
||||||
pushKey: String,
|
pushKey: String,
|
||||||
|
|||||||
Reference in New Issue
Block a user