account = SignalAccount.createOrUpdateLinkedAccount(pathConfig.dataPath(),
accountPath,
number,
+ serviceEnvironmentConfig.getType(),
aci,
pni,
password,
logger.debug("Account is a master device.");
return false;
}
+ if (signalAccount.isRegistered()
+ && signalAccount.getServiceEnvironment() != null
+ && signalAccount.getServiceEnvironment() != serviceEnvironmentConfig.getType()) {
+ logger.debug("Account is registered in another environment: {}.",
+ signalAccount.getServiceEnvironment());
+ return false;
+ }
final var m = new ManagerImpl(signalAccount,
pathConfig,