Update libsignal-service-java

This commit is contained in:
AsamK 2023-04-16 21:18:54 +02:00
parent d2251ccd14
commit 842f13b2fc
3 changed files with 41 additions and 25 deletions

View file

@ -345,8 +345,8 @@ public class SendHelper {
},
() -> false,
urgent);
final SenderKeySenderHandler senderKeySender = (distId, recipients, unidentifiedAccess, isRecipientUpdate) -> {
final var res = messageSender.sendGroupDataMessage(distId,
final SenderKeySenderHandler senderKeySender = (distId, recipients, unidentifiedAccess, isRecipientUpdate) -> messageSender.sendGroupDataMessage(
distId,
recipients,
unidentifiedAccess,
isRecipientUpdate,
@ -354,20 +354,32 @@ public class SendHelper {
message,
SignalServiceMessageSender.SenderKeyGroupEvents.EMPTY,
urgent,
false);
false,
sendResult -> {
logger.trace("Partial message send results: {}", sendResult.size());
synchronized (entryId) {
if (entryId.get() == -1) {
final var newId = messageSendLogStore.insertIfPossible(message.getTimestamp(),
res,
sendResult,
contentHint,
urgent);
entryId.set(newId);
} else {
messageSendLogStore.addRecipientToExistingEntryIfPossible(entryId.get(), res);
messageSendLogStore.addRecipientToExistingEntryIfPossible(entryId.get(), sendResult);
}
}
return res;
};
synchronized (entryId) {
if (entryId.get() == -1) {
final var newId = messageSendLogStore.insertIfPossible(message.getTimestamp(),
sendResult,
contentHint,
urgent);
entryId.set(newId);
} else {
messageSendLogStore.addRecipientToExistingEntryIfPossible(entryId.get(), sendResult);
}
}
});
final var results = sendGroupMessageInternal(legacySender, senderKeySender, recipientIds, distributionId);
for (var r : results) {

View file

@ -16,7 +16,7 @@ dependencyResolutionManagement {
library("logback", "ch.qos.logback", "logback-classic").version("1.4.6")
library("signalservice", "com.github.turasa", "signal-service-java").version("2.15.3_unofficial_68")
library("signalservice", "com.github.turasa", "signal-service-java").version("2.15.3_unofficial_69")
library("protobuf", "com.google.protobuf", "protobuf-javalite").version("3.22.2")
library("sqlite", "org.xerial", "sqlite-jdbc").version("3.41.2.1")
library("hikari", "com.zaxxer", "HikariCP").version("5.0.1")

View file

@ -55,7 +55,11 @@ public class FinishLinkCommand implements JsonRpcMultiCommand<FinishLinkCommand.
} catch (TimeoutException e) {
throw new UserErrorException("Link request timed out, please try again.");
} catch (IOException e) {
throw new IOErrorException("Link request error: " + e.getMessage(), e);
throw new IOErrorException("Link request error: "
+ e.getMessage()
+ " ("
+ e.getClass().getSimpleName()
+ ")", e);
} catch (UserAlreadyExistsException e) {
throw new UserErrorException("The user "
+ e.getNumber()