From a6ab8f7e80d74b4a7313c0c1c4cf3b1cda84aa17 Mon Sep 17 00:00:00 2001 From: AsamK Date: Sat, 28 Sep 2024 16:44:23 +0200 Subject: [PATCH] Remove v2 suffix from secure value recovery --- .../java/org/asamk/signal/manager/helper/Context.java | 2 +- .../java/org/asamk/signal/manager/helper/PinHelper.java | 6 +++--- .../signal/manager/internal/RegistrationManagerImpl.java | 6 +++--- .../asamk/signal/manager/internal/SignalDependencies.java | 8 ++++---- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/src/main/java/org/asamk/signal/manager/helper/Context.java b/lib/src/main/java/org/asamk/signal/manager/helper/Context.java index 848a57c161..2ff9c7e45b 100644 --- a/lib/src/main/java/org/asamk/signal/manager/helper/Context.java +++ b/lib/src/main/java/org/asamk/signal/manager/helper/Context.java @@ -114,7 +114,7 @@ public IncomingMessageHandler getIncomingMessageHandler() { } PinHelper getPinHelper() { - return getOrCreate(() -> pinHelper, () -> pinHelper = new PinHelper(dependencies.getSecureValueRecoveryV2())); + return getOrCreate(() -> pinHelper, () -> pinHelper = new PinHelper(dependencies.getSecureValueRecovery())); } public PreKeyHelper getPreKeyHelper() { diff --git a/lib/src/main/java/org/asamk/signal/manager/helper/PinHelper.java b/lib/src/main/java/org/asamk/signal/manager/helper/PinHelper.java index cb9b9057eb..7669b383dd 100644 --- a/lib/src/main/java/org/asamk/signal/manager/helper/PinHelper.java +++ b/lib/src/main/java/org/asamk/signal/manager/helper/PinHelper.java @@ -32,11 +32,11 @@ public void setRegistrationLockPin( case SecureValueRecovery.BackupResponse.Success success -> { } case SecureValueRecovery.BackupResponse.ServerRejected serverRejected -> - logger.warn("Backup svr2 failed: ServerRejected"); + logger.warn("Backup svr failed: ServerRejected"); case SecureValueRecovery.BackupResponse.EnclaveNotFound enclaveNotFound -> - logger.warn("Backup svr2 failed: EnclaveNotFound"); + logger.warn("Backup svr failed: EnclaveNotFound"); case SecureValueRecovery.BackupResponse.ExposeFailure exposeFailure -> - logger.warn("Backup svr2 failed: ExposeFailure"); + logger.warn("Backup svr failed: ExposeFailure"); case SecureValueRecovery.BackupResponse.ApplicationError error -> throw new IOException(error.getException()); case SecureValueRecovery.BackupResponse.NetworkError error -> throw error.getException(); diff --git a/lib/src/main/java/org/asamk/signal/manager/internal/RegistrationManagerImpl.java b/lib/src/main/java/org/asamk/signal/manager/internal/RegistrationManagerImpl.java index 47aeaf92ab..015d17a00e 100644 --- a/lib/src/main/java/org/asamk/signal/manager/internal/RegistrationManagerImpl.java +++ b/lib/src/main/java/org/asamk/signal/manager/internal/RegistrationManagerImpl.java @@ -96,11 +96,11 @@ public RegistrationManagerImpl( userAgent, ServiceConfig.AUTOMATIC_NETWORK_RETRY, ServiceConfig.GROUP_MAX_SIZE); - final var secureValueRecoveryV2 = serviceEnvironmentConfig.svr2Mrenclaves() + final var secureValueRecovery = serviceEnvironmentConfig.svr2Mrenclaves() .stream() - .map(mr -> (SecureValueRecovery) accountManager.getSecureValueRecoveryV2(mr)) + .map(mr -> (SecureValueRecovery) this.unauthenticatedAccountManager.getSecureValueRecoveryV2(mr)) .toList(); - this.pinHelper = new PinHelper(secureValueRecoveryV2); + this.pinHelper = new PinHelper(secureValueRecovery); } @Override diff --git a/lib/src/main/java/org/asamk/signal/manager/internal/SignalDependencies.java b/lib/src/main/java/org/asamk/signal/manager/internal/SignalDependencies.java index 37fbb3bb38..f4f72aca6a 100644 --- a/lib/src/main/java/org/asamk/signal/manager/internal/SignalDependencies.java +++ b/lib/src/main/java/org/asamk/signal/manager/internal/SignalDependencies.java @@ -57,7 +57,7 @@ public class SignalDependencies { private SignalServiceMessageReceiver messageReceiver; private SignalServiceMessageSender messageSender; - private List secureValueRecoveryV2; + private List secureValueRecovery; private ProfileService profileService; SignalDependencies( @@ -205,9 +205,9 @@ public SignalServiceMessageSender getMessageSender() { ServiceConfig.MAX_ENVELOPE_SIZE)); } - public List getSecureValueRecoveryV2() { - return getOrCreate(() -> secureValueRecoveryV2, - () -> secureValueRecoveryV2 = serviceEnvironmentConfig.svr2Mrenclaves() + public List getSecureValueRecovery() { + return getOrCreate(() -> secureValueRecovery, + () -> secureValueRecovery = serviceEnvironmentConfig.svr2Mrenclaves() .stream() .map(mr -> (SecureValueRecovery) getAccountManager().getSecureValueRecoveryV2(mr)) .toList());