Update libsignal-service

This commit is contained in:
AsamK 2024-08-20 17:39:39 +02:00
parent 130cee9906
commit cb129db95e
5 changed files with 28 additions and 35 deletions

View file

@ -2,6 +2,12 @@
## [Unreleased]
Requires libsignal-client version 0.52.5
### Fixed
- Fix issue with sending to some groups
## [0.13.5] - 2024-07-25
Requires libsignal-client version 0.52.2

View file

@ -248,7 +248,8 @@
"allDeclaredMethods":true
},
{
"name":"java.lang.Object"
"name":"java.lang.Object",
"methods":[{"name":"equals","parameterTypes":["java.lang.Object"] }, {"name":"hashCode","parameterTypes":[] }, {"name":"toString","parameterTypes":[] }]
},
{
"name":"java.lang.Record",
@ -2236,7 +2237,7 @@
"allDeclaredFields":true,
"queryAllDeclaredMethods":true,
"queryAllDeclaredConstructors":true,
"methods":[{"name":"<init>","parameterTypes":["org.signal.libsignal.protocol.ServiceId"] }]
"methods":[{"name":"<init>","parameterTypes":["org.signal.libsignal.protocol.ServiceId"] }, {"name":"equals","parameterTypes":["java.lang.Object"] }, {"name":"hashCode","parameterTypes":[] }, {"name":"logString","parameterTypes":[] }, {"name":"toByteArray","parameterTypes":[] }, {"name":"toByteString","parameterTypes":[] }, {"name":"toProtocolAddress","parameterTypes":["int"] }, {"name":"toString","parameterTypes":[] }]
},
{
"name":"org.whispersystems.signalservice.api.push.ServiceId$ACI"
@ -2246,7 +2247,7 @@
"allDeclaredFields":true,
"queryAllDeclaredMethods":true,
"queryAllDeclaredConstructors":true,
"methods":[{"name":"fromLibSignal","parameterTypes":["org.signal.libsignal.protocol.ServiceId"] }, {"name":"parseOrNull","parameterTypes":["java.lang.String"] }, {"name":"parseOrNull","parameterTypes":["okio.ByteString"] }, {"name":"parseOrNull","parameterTypes":["byte[]"] }, {"name":"parseOrThrow","parameterTypes":["java.lang.String"] }, {"name":"parseOrThrow","parameterTypes":["okio.ByteString"] }, {"name":"parseOrThrow","parameterTypes":["byte[]"] }]
"methods":[{"name":"equals","parameterTypes":["java.lang.Object"] }, {"name":"fromLibSignal","parameterTypes":["org.signal.libsignal.protocol.ServiceId"] }, {"name":"hashCode","parameterTypes":[] }, {"name":"parseOrNull","parameterTypes":["java.lang.String"] }, {"name":"parseOrNull","parameterTypes":["java.lang.String","boolean"] }, {"name":"parseOrNull","parameterTypes":["okio.ByteString"] }, {"name":"parseOrNull","parameterTypes":["byte[]"] }, {"name":"parseOrThrow","parameterTypes":["java.lang.String"] }, {"name":"parseOrThrow","parameterTypes":["okio.ByteString"] }, {"name":"parseOrThrow","parameterTypes":["byte[]"] }, {"name":"toString","parameterTypes":[] }]
},
{
"name":"org.whispersystems.signalservice.api.push.ServiceId$PNI"

View file

@ -202,26 +202,17 @@ public class SendHelper {
}
try {
return messageSender.sendSyncMessage(message);
} catch (UnregisteredUserException e) {
var address = context.getRecipientHelper().resolveSignalServiceAddress(account.getSelfRecipientId());
return SendMessageResult.unregisteredFailure(address);
} catch (ProofRequiredException e) {
var address = context.getRecipientHelper().resolveSignalServiceAddress(account.getSelfRecipientId());
return SendMessageResult.proofRequiredFailure(address, e);
} catch (RateLimitException e) {
var address = context.getRecipientHelper().resolveSignalServiceAddress(account.getSelfRecipientId());
logger.warn("Sending failed due to rate limiting from the signal server: {}", e.getMessage());
return SendMessageResult.rateLimitFailure(address, e);
} catch (org.whispersystems.signalservice.api.crypto.UntrustedIdentityException e) {
var address = context.getRecipientHelper().resolveSignalServiceAddress(account.getSelfRecipientId());
return SendMessageResult.identityFailure(address, e.getIdentityKey());
} catch (IOException e) {
} catch (Throwable e) {
var address = context.getRecipientHelper().resolveSignalServiceAddress(account.getSelfRecipientId());
try {
return SignalServiceMessageSender.mapSendErrorToSendResult(e, System.currentTimeMillis(), address);
} catch (IOException ex) {
logger.warn("Failed to send message due to IO exception: {}", e.getMessage());
logger.debug("Exception", e);
return SendMessageResult.networkFailure(address);
}
}
}
public SendMessageResult sendTypingMessage(
SignalServiceTypingMessage message, RecipientId recipientId
@ -704,21 +695,16 @@ public class SendHelper {
context.getUnidentifiedAccessHelper().getSealedSenderAccessFor(newRecipientId),
includePniSignature);
}
} catch (UnregisteredUserException e) {
return SendMessageResult.unregisteredFailure(address);
} catch (ProofRequiredException e) {
return SendMessageResult.proofRequiredFailure(address, e);
} catch (RateLimitException e) {
logger.warn("Sending failed due to rate limiting from the signal server: {}", e.getMessage());
return SendMessageResult.rateLimitFailure(address, e);
} catch (org.whispersystems.signalservice.api.crypto.UntrustedIdentityException e) {
return SendMessageResult.identityFailure(address, e.getIdentityKey());
} catch (IOException e) {
} catch (Throwable e) {
try {
return SignalServiceMessageSender.mapSendErrorToSendResult(e, System.currentTimeMillis(), address);
} catch (IOException ex) {
logger.warn("Failed to send message due to IO exception: {}", e.getMessage());
logger.debug("Exception", e);
return SendMessageResult.networkFailure(address);
}
}
}
private SendMessageResult sendSelfMessage(SignalServiceDataMessage message, Optional<Long> editTargetTimestamp) {
var address = account.getSelfAddress();

View file

@ -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_105")
library("signalservice", "com.github.turasa", "signal-service-java").version("2.15.3_unofficial_106")
library("sqlite", "org.xerial", "sqlite-jdbc").version("3.46.0.0")
library("hikari", "com.zaxxer", "HikariCP").version("5.1.0")
library("junit.jupiter", "org.junit.jupiter", "junit-jupiter").version("5.10.2")

View file

@ -8,7 +8,7 @@ public class BaseConfig {
public static final String PROJECT_VERSION = BaseConfig.class.getPackage().getImplementationVersion();
static final String USER_AGENT_SIGNAL_ANDROID = Optional.ofNullable(System.getenv("SIGNAL_CLI_USER_AGENT"))
.orElse("Signal-Android/7.12.1");
.orElse("Signal-Android/7.14.1");
static final String USER_AGENT_SIGNAL_CLI = PROJECT_NAME == null
? "signal-cli"
: PROJECT_NAME + "/" + PROJECT_VERSION;