X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/9ffacfe90e54a86da289d3e6fb3c3df738f57abb..d2251ccd14081b80a1c7bcc906ad866502ff921b:/lib/src/main/java/org/asamk/signal/manager/SignalDependencies.java diff --git a/lib/src/main/java/org/asamk/signal/manager/SignalDependencies.java b/lib/src/main/java/org/asamk/signal/manager/SignalDependencies.java index 3b3b375a..7a8ecc4b 100644 --- a/lib/src/main/java/org/asamk/signal/manager/SignalDependencies.java +++ b/lib/src/main/java/org/asamk/signal/manager/SignalDependencies.java @@ -27,8 +27,6 @@ import java.util.Optional; import java.util.concurrent.ExecutorService; import java.util.function.Supplier; -import static org.asamk.signal.manager.config.ServiceConfig.capabilities; - public class SignalDependencies { private final Object LOCK = new Object(); @@ -88,6 +86,10 @@ public class SignalDependencies { return serviceEnvironmentConfig; } + public SignalSessionLock getSessionLock() { + return sessionLock; + } + public SignalServiceAccountManager getAccountManager() { return getOrCreate(() -> accountManager, () -> accountManager = new SignalServiceAccountManager(serviceEnvironmentConfig.getSignalServiceConfiguration(), @@ -115,17 +117,13 @@ public class SignalDependencies { public GroupsV2Operations getGroupsV2Operations() { return getOrCreate(() -> groupsV2Operations, - () -> groupsV2Operations = capabilities.isGv2() - ? new GroupsV2Operations(ClientZkOperations.create(serviceEnvironmentConfig.getSignalServiceConfiguration()), - ServiceConfig.GROUP_MAX_SIZE) - : null); + () -> groupsV2Operations = new GroupsV2Operations(ClientZkOperations.create(serviceEnvironmentConfig.getSignalServiceConfiguration()), + ServiceConfig.GROUP_MAX_SIZE)); } private ClientZkOperations getClientZkOperations() { return getOrCreate(() -> clientZkOperations, - () -> clientZkOperations = capabilities.isGv2() - ? ClientZkOperations.create(serviceEnvironmentConfig.getSignalServiceConfiguration()) - : null); + () -> clientZkOperations = ClientZkOperations.create(serviceEnvironmentConfig.getSignalServiceConfiguration())); } private ClientZkProfileOperations getClientZkProfileOperations() {