From 2f0fa6d773aa05c2dd326f88bf3d6a8e6ae09503 Mon Sep 17 00:00:00 2001 From: nielsandriesse Date: Mon, 21 Sep 2020 11:17:39 +1000 Subject: [PATCH] Update for core changes --- src/org/thoughtcrime/securesms/ApplicationContext.java | 4 ++-- .../securesms/loki/api/LokiPushNotificationManager.kt | 6 +++--- .../securesms/loki/api/PushNotificationService.kt | 1 - 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/org/thoughtcrime/securesms/ApplicationContext.java b/src/org/thoughtcrime/securesms/ApplicationContext.java index 98545215fe..11d4dc48d4 100644 --- a/src/org/thoughtcrime/securesms/ApplicationContext.java +++ b/src/org/thoughtcrime/securesms/ApplicationContext.java @@ -103,7 +103,7 @@ import org.whispersystems.signalservice.api.push.SignalServiceAddress; import org.whispersystems.signalservice.api.util.StreamDetails; import org.whispersystems.signalservice.internal.push.SignalServiceProtos; import org.whispersystems.signalservice.loki.api.Poller; -import org.whispersystems.signalservice.loki.api.PushNotificationAcknowledgement; +import org.whispersystems.signalservice.loki.api.PushNotificationAPI; import org.whispersystems.signalservice.loki.api.SnodeAPI; import org.whispersystems.signalservice.loki.api.SwarmAPI; import org.whispersystems.signalservice.loki.api.fileserver.FileServerAPI; @@ -206,7 +206,7 @@ public class ApplicationContext extends MultiDexApplication implements Dependenc MultiDeviceProtocol.Companion.configureIfNeeded(apiDB); SessionManagementProtocol.Companion.configureIfNeeded(sessionResetImpl, sskDatabase, this); setUpP2PAPIIfNeeded(); - PushNotificationAcknowledgement.Companion.configureIfNeeded(BuildConfig.DEBUG); + PushNotificationAPI.Companion.configureIfNeeded(BuildConfig.DEBUG); if (setUpStorageAPIIfNeeded()) { if (userPublicKey != null) { Set deviceLinks = DatabaseFactory.getLokiAPIDatabase(this).getDeviceLinks(userPublicKey); diff --git a/src/org/thoughtcrime/securesms/loki/api/LokiPushNotificationManager.kt b/src/org/thoughtcrime/securesms/loki/api/LokiPushNotificationManager.kt index 0f12ecd845..1b57b0b6d6 100644 --- a/src/org/thoughtcrime/securesms/loki/api/LokiPushNotificationManager.kt +++ b/src/org/thoughtcrime/securesms/loki/api/LokiPushNotificationManager.kt @@ -7,17 +7,17 @@ import org.thoughtcrime.securesms.database.DatabaseFactory import org.thoughtcrime.securesms.util.TextSecurePreferences import org.whispersystems.libsignal.logging.Log import org.whispersystems.signalservice.internal.util.JsonUtil -import org.whispersystems.signalservice.loki.api.PushNotificationAcknowledgement +import org.whispersystems.signalservice.loki.api.PushNotificationAPI import org.whispersystems.signalservice.loki.api.onionrequests.OnionRequestAPI object LokiPushNotificationManager { private val tokenExpirationInterval = 12 * 60 * 60 * 1000 private val server by lazy { - PushNotificationAcknowledgement.shared.server + PushNotificationAPI.shared.server } private val pnServerPublicKey by lazy { - PushNotificationAcknowledgement.pnServerPublicKey + PushNotificationAPI.pnServerPublicKey } enum class ClosedGroupOperation { diff --git a/src/org/thoughtcrime/securesms/loki/api/PushNotificationService.kt b/src/org/thoughtcrime/securesms/loki/api/PushNotificationService.kt index b4b2ec11d3..4e3ef4a700 100644 --- a/src/org/thoughtcrime/securesms/loki/api/PushNotificationService.kt +++ b/src/org/thoughtcrime/securesms/loki/api/PushNotificationService.kt @@ -15,7 +15,6 @@ import org.whispersystems.signalservice.api.messages.SignalServiceEnvelope import org.whispersystems.signalservice.internal.util.Base64 import org.whispersystems.signalservice.loki.api.MessageWrapper - class PushNotificationService : FirebaseMessagingService() { override fun onNewToken(token: String) {