mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-28 18:10:38 +00:00
Update libsignal-service
This commit is contained in:
parent
fb81bf1d05
commit
8f756cd90c
4 changed files with 15 additions and 9 deletions
|
@ -12,7 +12,7 @@
|
|||
},
|
||||
{
|
||||
"name":"java.lang.Class",
|
||||
"methods":[{"name":"getCanonicalName","parameterTypes":[] }]
|
||||
"methods":[{"name":"getCanonicalName","parameterTypes":[] }, {"name":"getClassLoader","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"java.lang.ClassLoader",
|
||||
|
@ -62,6 +62,9 @@
|
|||
"name":"java.util.UUID",
|
||||
"methods":[{"name":"<init>","parameterTypes":["long","long"] }, {"name":"getLeastSignificantBits","parameterTypes":[] }, {"name":"getMostSignificantBits","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"jdk.internal.loader.ClassLoaders$AppClassLoader"
|
||||
},
|
||||
{
|
||||
"name":"jdk.internal.loader.ClassLoaders$PlatformClassLoader"
|
||||
},
|
||||
|
|
|
@ -23,6 +23,8 @@ import org.whispersystems.signalservice.api.util.CredentialsProvider;
|
|||
import org.whispersystems.signalservice.api.util.UptimeSleepTimer;
|
||||
import org.whispersystems.signalservice.api.websocket.WebSocketFactory;
|
||||
import org.whispersystems.signalservice.internal.push.PushServiceSocket;
|
||||
import org.whispersystems.signalservice.internal.websocket.LibSignalNetwork;
|
||||
import org.whispersystems.signalservice.internal.websocket.OkHttpWebSocketConnection;
|
||||
import org.whispersystems.signalservice.internal.websocket.WebSocketConnection;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -49,7 +51,7 @@ public class SignalDependencies {
|
|||
private ClientZkOperations clientZkOperations;
|
||||
|
||||
private PushServiceSocket pushServiceSocket;
|
||||
private Network libSignalNetwork;
|
||||
private LibSignalNetwork libSignalNetwork;
|
||||
private SignalWebSocket signalWebSocket;
|
||||
private SignalServiceMessageReceiver messageReceiver;
|
||||
private SignalServiceMessageSender messageSender;
|
||||
|
@ -106,9 +108,10 @@ public class SignalDependencies {
|
|||
ServiceConfig.AUTOMATIC_NETWORK_RETRY));
|
||||
}
|
||||
|
||||
public Network getLibSignalNetwork() {
|
||||
public LibSignalNetwork getLibSignalNetwork() {
|
||||
return getOrCreate(() -> libSignalNetwork,
|
||||
() -> libSignalNetwork = new Network(serviceEnvironmentConfig.netEnvironment()));
|
||||
() -> libSignalNetwork = new LibSignalNetwork(new Network(serviceEnvironmentConfig.netEnvironment(),
|
||||
userAgent), serviceEnvironmentConfig.signalServiceConfiguration()));
|
||||
}
|
||||
|
||||
public SignalServiceAccountManager getAccountManager() {
|
||||
|
@ -159,7 +162,7 @@ public class SignalDependencies {
|
|||
final var webSocketFactory = new WebSocketFactory() {
|
||||
@Override
|
||||
public WebSocketConnection createWebSocket() {
|
||||
return new WebSocketConnection("normal",
|
||||
return new OkHttpWebSocketConnection("normal",
|
||||
serviceEnvironmentConfig.signalServiceConfiguration(),
|
||||
Optional.of(credentialsProvider),
|
||||
userAgent,
|
||||
|
@ -169,7 +172,7 @@ public class SignalDependencies {
|
|||
|
||||
@Override
|
||||
public WebSocketConnection createUnidentifiedWebSocket() {
|
||||
return new WebSocketConnection("unidentified",
|
||||
return new OkHttpWebSocketConnection("unidentified",
|
||||
serviceEnvironmentConfig.signalServiceConfiguration(),
|
||||
Optional.empty(),
|
||||
userAgent,
|
||||
|
|
|
@ -7,7 +7,7 @@ import org.whispersystems.signalservice.api.util.Preconditions;
|
|||
import org.whispersystems.signalservice.api.util.SleepTimer;
|
||||
import org.whispersystems.signalservice.api.websocket.HealthMonitor;
|
||||
import org.whispersystems.signalservice.api.websocket.WebSocketConnectionState;
|
||||
import org.whispersystems.signalservice.internal.websocket.WebSocketConnection;
|
||||
import org.whispersystems.signalservice.internal.websocket.OkHttpWebSocketConnection;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
@ -25,7 +25,7 @@ final class SignalWebSocketHealthMonitor implements HealthMonitor {
|
|||
|
||||
private static final Logger logger = LoggerFactory.getLogger(SignalWebSocketHealthMonitor.class);
|
||||
|
||||
private static final long KEEP_ALIVE_SEND_CADENCE = TimeUnit.SECONDS.toMillis(WebSocketConnection.KEEPALIVE_FREQUENCY_SECONDS);
|
||||
private static final long KEEP_ALIVE_SEND_CADENCE = TimeUnit.SECONDS.toMillis(OkHttpWebSocketConnection.KEEPALIVE_FREQUENCY_SECONDS);
|
||||
private static final long MAX_TIME_SINCE_SUCCESSFUL_KEEP_ALIVE = KEEP_ALIVE_SEND_CADENCE * 3;
|
||||
|
||||
private SignalWebSocket signalWebSocket;
|
||||
|
|
|
@ -15,7 +15,7 @@ dependencyResolutionManagement {
|
|||
library("slf4j.jul", "org.slf4j", "jul-to-slf4j").versionRef("slf4j")
|
||||
library("logback", "ch.qos.logback", "logback-classic").version("1.5.6")
|
||||
|
||||
library("signalservice", "com.github.turasa", "signal-service-java").version("2.15.3_unofficial_101")
|
||||
library("signalservice", "com.github.turasa", "signal-service-java").version("2.15.3_unofficial_102")
|
||||
library("sqlite", "org.xerial", "sqlite-jdbc").version("3.45.3.0")
|
||||
library("hikari", "com.zaxxer", "HikariCP").version("5.1.0")
|
||||
library("junit.jupiter", "org.junit.jupiter", "junit-jupiter").version("5.10.2")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue