X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/b0bb602eb59eb6238a87d8a4ba942ac3bc0dc90d..3abb641c7c554bf8a719b0a47a494aee1f9d8eba:/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 450abaac..aeef7f15 100644 --- a/lib/src/main/java/org/asamk/signal/manager/SignalDependencies.java +++ b/lib/src/main/java/org/asamk/signal/manager/SignalDependencies.java @@ -3,8 +3,7 @@ package org.asamk.signal.manager; import org.asamk.signal.manager.config.ServiceConfig; import org.asamk.signal.manager.config.ServiceEnvironmentConfig; import org.signal.libsignal.metadata.certificate.CertificateValidator; -import org.signal.zkgroup.profiles.ClientZkProfileOperations; -import org.whispersystems.libsignal.util.guava.Optional; +import org.signal.libsignal.zkgroup.profiles.ClientZkProfileOperations; import org.whispersystems.signalservice.api.KeyBackupService; import org.whispersystems.signalservice.api.SignalServiceAccountManager; import org.whispersystems.signalservice.api.SignalServiceDataStore; @@ -23,6 +22,7 @@ import org.whispersystems.signalservice.api.util.UptimeSleepTimer; import org.whispersystems.signalservice.api.websocket.WebSocketFactory; import org.whispersystems.signalservice.internal.websocket.WebSocketConnection; +import java.util.Optional; import java.util.concurrent.ExecutorService; import java.util.function.Supplier; @@ -88,12 +88,14 @@ public class SignalDependencies { public SignalServiceAccountManager createUnauthenticatedAccountManager(String number, String password) { return new SignalServiceAccountManager(getServiceEnvironmentConfig().getSignalServiceConfiguration(), + null, null, number, SignalServiceAddress.DEFAULT_DEVICE_ID, password, userAgent, - ServiceConfig.AUTOMATIC_NETWORK_RETRY); + ServiceConfig.AUTOMATIC_NETWORK_RETRY, + ServiceConfig.GROUP_MAX_SIZE); } public GroupsV2Api getGroupsV2Api() { @@ -102,8 +104,10 @@ public class SignalDependencies { public GroupsV2Operations getGroupsV2Operations() { return getOrCreate(() -> groupsV2Operations, - () -> groupsV2Operations = capabilities.isGv2() ? new GroupsV2Operations(ClientZkOperations.create( - serviceEnvironmentConfig.getSignalServiceConfiguration())) : null); + () -> groupsV2Operations = capabilities.isGv2() + ? new GroupsV2Operations(ClientZkOperations.create(serviceEnvironmentConfig.getSignalServiceConfiguration()), + ServiceConfig.GROUP_MAX_SIZE) + : null); } private ClientZkOperations getClientZkOperations() { @@ -136,7 +140,7 @@ public class SignalDependencies { public WebSocketConnection createUnidentifiedWebSocket() { return new WebSocketConnection("unidentified", serviceEnvironmentConfig.getSignalServiceConfiguration(), - Optional.absent(), + Optional.empty(), userAgent, healthMonitor); } @@ -163,7 +167,7 @@ public class SignalDependencies { sessionLock, userAgent, getSignalWebSocket(), - Optional.absent(), + Optional.empty(), getClientZkProfileOperations(), executor, ServiceConfig.MAX_ENVELOPE_SIZE,