Remove v2 suffix from secure value recovery

This commit is contained in:
AsamK 2024-09-28 16:44:23 +02:00
parent 19dc2d446b
commit a6ab8f7e80
4 changed files with 11 additions and 11 deletions

View file

@ -114,7 +114,7 @@ public class Context implements AutoCloseable {
}
PinHelper getPinHelper() {
return getOrCreate(() -> pinHelper, () -> pinHelper = new PinHelper(dependencies.getSecureValueRecoveryV2()));
return getOrCreate(() -> pinHelper, () -> pinHelper = new PinHelper(dependencies.getSecureValueRecovery()));
}
public PreKeyHelper getPreKeyHelper() {

View file

@ -32,11 +32,11 @@ public class PinHelper {
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();

View file

@ -96,11 +96,11 @@ public class RegistrationManagerImpl implements RegistrationManager {
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

View file

@ -57,7 +57,7 @@ public class SignalDependencies {
private SignalServiceMessageReceiver messageReceiver;
private SignalServiceMessageSender messageSender;
private List<SecureValueRecovery> secureValueRecoveryV2;
private List<SecureValueRecovery> secureValueRecovery;
private ProfileService profileService;
SignalDependencies(
@ -205,9 +205,9 @@ public class SignalDependencies {
ServiceConfig.MAX_ENVELOPE_SIZE));
}
public List<SecureValueRecovery> getSecureValueRecoveryV2() {
return getOrCreate(() -> secureValueRecoveryV2,
() -> secureValueRecoveryV2 = serviceEnvironmentConfig.svr2Mrenclaves()
public List<SecureValueRecovery> getSecureValueRecovery() {
return getOrCreate(() -> secureValueRecovery,
() -> secureValueRecovery = serviceEnvironmentConfig.svr2Mrenclaves()
.stream()
.map(mr -> (SecureValueRecovery) getAccountManager().getSecureValueRecoveryV2(mr))
.toList());