Update for core changes

This commit is contained in:
nielsandriesse 2020-09-21 11:17:39 +10:00
parent 997568b325
commit 2f0fa6d773
3 changed files with 5 additions and 6 deletions

View File

@ -103,7 +103,7 @@ import org.whispersystems.signalservice.api.push.SignalServiceAddress;
import org.whispersystems.signalservice.api.util.StreamDetails; import org.whispersystems.signalservice.api.util.StreamDetails;
import org.whispersystems.signalservice.internal.push.SignalServiceProtos; import org.whispersystems.signalservice.internal.push.SignalServiceProtos;
import org.whispersystems.signalservice.loki.api.Poller; 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.SnodeAPI;
import org.whispersystems.signalservice.loki.api.SwarmAPI; import org.whispersystems.signalservice.loki.api.SwarmAPI;
import org.whispersystems.signalservice.loki.api.fileserver.FileServerAPI; import org.whispersystems.signalservice.loki.api.fileserver.FileServerAPI;
@ -206,7 +206,7 @@ public class ApplicationContext extends MultiDexApplication implements Dependenc
MultiDeviceProtocol.Companion.configureIfNeeded(apiDB); MultiDeviceProtocol.Companion.configureIfNeeded(apiDB);
SessionManagementProtocol.Companion.configureIfNeeded(sessionResetImpl, sskDatabase, this); SessionManagementProtocol.Companion.configureIfNeeded(sessionResetImpl, sskDatabase, this);
setUpP2PAPIIfNeeded(); setUpP2PAPIIfNeeded();
PushNotificationAcknowledgement.Companion.configureIfNeeded(BuildConfig.DEBUG); PushNotificationAPI.Companion.configureIfNeeded(BuildConfig.DEBUG);
if (setUpStorageAPIIfNeeded()) { if (setUpStorageAPIIfNeeded()) {
if (userPublicKey != null) { if (userPublicKey != null) {
Set<DeviceLink> deviceLinks = DatabaseFactory.getLokiAPIDatabase(this).getDeviceLinks(userPublicKey); Set<DeviceLink> deviceLinks = DatabaseFactory.getLokiAPIDatabase(this).getDeviceLinks(userPublicKey);

View File

@ -7,17 +7,17 @@ import org.thoughtcrime.securesms.database.DatabaseFactory
import org.thoughtcrime.securesms.util.TextSecurePreferences import org.thoughtcrime.securesms.util.TextSecurePreferences
import org.whispersystems.libsignal.logging.Log import org.whispersystems.libsignal.logging.Log
import org.whispersystems.signalservice.internal.util.JsonUtil 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 import org.whispersystems.signalservice.loki.api.onionrequests.OnionRequestAPI
object LokiPushNotificationManager { object LokiPushNotificationManager {
private val tokenExpirationInterval = 12 * 60 * 60 * 1000 private val tokenExpirationInterval = 12 * 60 * 60 * 1000
private val server by lazy { private val server by lazy {
PushNotificationAcknowledgement.shared.server PushNotificationAPI.shared.server
} }
private val pnServerPublicKey by lazy { private val pnServerPublicKey by lazy {
PushNotificationAcknowledgement.pnServerPublicKey PushNotificationAPI.pnServerPublicKey
} }
enum class ClosedGroupOperation { enum class ClosedGroupOperation {

View File

@ -15,7 +15,6 @@ import org.whispersystems.signalservice.api.messages.SignalServiceEnvelope
import org.whispersystems.signalservice.internal.util.Base64 import org.whispersystems.signalservice.internal.util.Base64
import org.whispersystems.signalservice.loki.api.MessageWrapper import org.whispersystems.signalservice.loki.api.MessageWrapper
class PushNotificationService : FirebaseMessagingService() { class PushNotificationService : FirebaseMessagingService() {
override fun onNewToken(token: String) { override fun onNewToken(token: String) {