Browse Source

Add todos

test/jme/compound-poc
Benoit Marty 2 years ago committed by Benoit Marty
parent
commit
70d41311ca
  1. 9
      libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/PushersManager.kt
  2. 2
      libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/VectorFirebaseMessagingService.kt
  3. 4
      libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/VectorPushHandler.kt
  4. 2
      libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/model/PushData.kt

9
libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/PushersManager.kt

@ -44,14 +44,14 @@ class PushersManager @Inject constructor(
) )
} }
fun enqueueRegisterPusherWithFcmKey(pushKey: String): UUID { fun enqueueRegisterPusherWithFcmKey(pushKey: String)/*: UUID*/ {
return enqueueRegisterPusher(pushKey, PushConfig.pusher_http_url) return enqueueRegisterPusher(pushKey, PushConfig.pusher_http_url)
} }
fun enqueueRegisterPusher( fun enqueueRegisterPusher(
pushKey: String, pushKey: String,
gateway: String gateway: String
): UUID { ) /*: UUID*/ {
/* /*
val currentSession = activeSessionHolder.getActiveSession() val currentSession = activeSessionHolder.getActiveSession()
val pusher = createHttpPusher(pushKey, gateway) val pusher = createHttpPusher(pushKey, gateway)
@ -59,7 +59,10 @@ class PushersManager @Inject constructor(
*/ */
// TODO EAx // TODO EAx
TODO() // TODO()
// Get all sessions
// Register pusher
// Close sessions
} }
private fun createHttpPusher( private fun createHttpPusher(

2
libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/VectorFirebaseMessagingService.kt

@ -47,7 +47,7 @@ class VectorFirebaseMessagingService : FirebaseMessagingService() {
Timber.tag(loggerTag.value).d("New Firebase token") Timber.tag(loggerTag.value).d("New Firebase token")
fcmHelper.storeFcmToken(token) fcmHelper.storeFcmToken(token)
if ( if (
pushDataStore.areNotificationEnabledForDevice() && // pushDataStore.areNotificationEnabledForDevice() &&
// TODO EAx activeSessionHolder.hasActiveSession() && // TODO EAx activeSessionHolder.hasActiveSession() &&
unifiedPushHelper.isEmbeddedDistributor() unifiedPushHelper.isEmbeddedDistributor()
) { ) {

4
libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/VectorPushHandler.kt

@ -114,6 +114,10 @@ class VectorPushHandler @Inject constructor(
} }
/* TODO EAx /* TODO EAx
- Open session
- get the event
- display the notif
val session = activeSessionHolder.getOrInitializeSession() val session = activeSessionHolder.getOrInitializeSession()
if (session == null) { if (session == null) {

2
libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/model/PushData.kt

@ -27,4 +27,6 @@ data class PushData(
val eventId: String?, val eventId: String?,
val roomId: String?, val roomId: String?,
val unread: Int?, val unread: Int?,
// TODO EAx Client secret
) )

Loading…
Cancel
Save