Update dependencies

This commit is contained in:
AsamK 2022-09-02 22:33:48 +02:00
parent c7aa9834a9
commit 2e8e81a926
9 changed files with 61 additions and 32 deletions

View file

@ -36,9 +36,9 @@ dependencies {
implementation("com.fasterxml.jackson.core", "jackson-databind", "2.13.3") implementation("com.fasterxml.jackson.core", "jackson-databind", "2.13.3")
implementation("net.sourceforge.argparse4j", "argparse4j", "0.9.0") implementation("net.sourceforge.argparse4j", "argparse4j", "0.9.0")
implementation("com.github.hypfvieh", "dbus-java-transport-native-unixsocket", "4.1.0") implementation("com.github.hypfvieh", "dbus-java-transport-native-unixsocket", "4.1.0")
implementation("org.slf4j", "slf4j-api", "1.7.36") implementation("org.slf4j", "slf4j-api", "2.0.0")
implementation("ch.qos.logback", "logback-classic", "1.2.11") implementation("ch.qos.logback", "logback-classic", "1.4.0")
implementation("org.slf4j", "jul-to-slf4j", "1.7.36") implementation("org.slf4j", "jul-to-slf4j", "2.0.0")
implementation(project(":lib")) implementation(project(":lib"))
} }

View file

@ -36,7 +36,10 @@
}, },
{ {
"name":"java.lang.Throwable", "name":"java.lang.Throwable",
"methods":[{"name":"getMessage","parameterTypes":[] }] "methods":[
{"name":"getMessage","parameterTypes":[] },
{"name":"toString","parameterTypes":[] }
]
}, },
{ {
"name":"java.lang.UnsatisfiedLinkError", "name":"java.lang.UnsatisfiedLinkError",
@ -187,33 +190,59 @@
"methods":[{"name":"<init>","parameterTypes":["java.lang.String"] }] "methods":[{"name":"<init>","parameterTypes":["java.lang.String"] }]
}, },
{ {
"name":"org.sqlite.Collation" "name":"org.sqlite.Collation",
"methods":[{"name":"xCompare","parameterTypes":["java.lang.String","java.lang.String"] }]
}, },
{ {
"name":"org.sqlite.Function" "name":"org.sqlite.Function",
"fields":[
{"name":"args"},
{"name":"context"},
{"name":"value"}
],
"methods":[{"name":"xFunc","parameterTypes":[] }]
}, },
{ {
"name":"org.sqlite.Function$Aggregate" "name":"org.sqlite.Function$Aggregate",
"methods":[
{"name":"clone","parameterTypes":[] },
{"name":"xFinal","parameterTypes":[] },
{"name":"xStep","parameterTypes":[] }
]
}, },
{ {
"name":"org.sqlite.Function$Window" "name":"org.sqlite.Function$Window",
"methods":[
{"name":"xInverse","parameterTypes":[] },
{"name":"xValue","parameterTypes":[] }
]
}, },
{ {
"name":"org.sqlite.ProgressHandler" "name":"org.sqlite.ProgressHandler"
}, },
{ {
"name":"org.sqlite.core.DB", "name":"org.sqlite.core.DB",
"methods":[{"name":"throwex","parameterTypes":["int"] }] "methods":[
{"name":"throwex","parameterTypes":[] },
{"name":"throwex","parameterTypes":["int"] }
]
}, },
{ {
"name":"org.sqlite.core.DB$ProgressObserver" "name":"org.sqlite.core.DB$ProgressObserver",
"methods":[{"name":"progress","parameterTypes":["int","int"] }]
}, },
{ {
"name":"org.sqlite.core.NativeDB", "name":"org.sqlite.core.NativeDB",
"fields":[ "fields":[
{"name":"colldatalist"}, {"name":"busyHandler"},
{"name":"commitListener"},
{"name":"pointer"}, {"name":"pointer"},
{"name":"udfdatalist"} {"name":"progressHandler"},
{"name":"updateListener"}
],
"methods":[
{"name":"stringToUtf8ByteArray","parameterTypes":["java.lang.String"] },
{"name":"throwex","parameterTypes":["java.lang.String"] }
] ]
} }
] ]

View file

@ -2653,6 +2653,7 @@
{"name":"dataMessage_"}, {"name":"dataMessage_"},
{"name":"decryptionErrorMessage_"}, {"name":"decryptionErrorMessage_"},
{"name":"nullMessage_"}, {"name":"nullMessage_"},
{"name":"pniSignatureMessage_"},
{"name":"receiptMessage_"}, {"name":"receiptMessage_"},
{"name":"senderKeyDistributionMessage_"}, {"name":"senderKeyDistributionMessage_"},
{"name":"storyMessage_"}, {"name":"storyMessage_"},
@ -2855,12 +2856,9 @@
{"name":"bitField0_"}, {"name":"bitField0_"},
{"name":"content_"}, {"name":"content_"},
{"name":"destinationUuid_"}, {"name":"destinationUuid_"},
{"name":"legacyMessage_"},
{"name":"relay_"},
{"name":"serverGuid_"}, {"name":"serverGuid_"},
{"name":"serverTimestamp_"}, {"name":"serverTimestamp_"},
{"name":"sourceDevice_"}, {"name":"sourceDevice_"},
{"name":"sourceE164_"},
{"name":"sourceUuid_"}, {"name":"sourceUuid_"},
{"name":"timestamp_"}, {"name":"timestamp_"},
{"name":"type_"}, {"name":"type_"},

View file

@ -13,6 +13,9 @@
{ {
"pattern":"\\QMETA-INF/services/org.freedesktop.dbus.spi.transport.ITransportProvider\\E" "pattern":"\\QMETA-INF/services/org.freedesktop.dbus.spi.transport.ITransportProvider\\E"
}, },
{
"pattern":"\\QMETA-INF/services/org.slf4j.spi.SLF4JServiceProvider\\E"
},
{ {
"pattern":"\\Qcom/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AG\\E" "pattern":"\\Qcom/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AG\\E"
}, },

View file

@ -14,12 +14,12 @@ repositories {
} }
dependencies { dependencies {
implementation("com.github.turasa", "signal-service-java", "2.15.3_unofficial_55") implementation("com.github.turasa", "signal-service-java", "2.15.3_unofficial_56")
implementation("com.fasterxml.jackson.core", "jackson-databind", "2.13.3") implementation("com.fasterxml.jackson.core", "jackson-databind", "2.13.3")
implementation("com.google.protobuf", "protobuf-javalite", "3.11.4") implementation("com.google.protobuf", "protobuf-javalite", "3.11.4")
implementation("org.bouncycastle", "bcprov-jdk15on", "1.70") implementation("org.bouncycastle", "bcprov-jdk15on", "1.70")
implementation("org.slf4j", "slf4j-api", "1.7.36") implementation("org.slf4j", "slf4j-api", "2.0.0")
implementation("org.xerial", "sqlite-jdbc", "3.39.2.0") implementation("org.xerial", "sqlite-jdbc", "3.39.2.1")
implementation("com.zaxxer", "HikariCP", "5.0.1") implementation("com.zaxxer", "HikariCP", "5.0.1")
} }

View file

@ -122,7 +122,8 @@ public class SendHelper {
final var result = handleSendMessage(recipientId, final var result = handleSendMessage(recipientId,
(messageSender, address, unidentifiedAccess) -> messageSender.sendReceipt(address, (messageSender, address, unidentifiedAccess) -> messageSender.sendReceipt(address,
unidentifiedAccess, unidentifiedAccess,
receiptMessage)); receiptMessage,
false));
messageSendLogStore.insertIfPossible(receiptMessage.getWhen(), result, ContentHint.IMPLICIT, false); messageSendLogStore.insertIfPossible(receiptMessage.getWhen(), result, ContentHint.IMPLICIT, false);
handleSendMessageResult(result); handleSendMessageResult(result);
return result; return result;
@ -141,6 +142,7 @@ public class SendHelper {
ContentHint.IMPLICIT, ContentHint.IMPLICIT,
message, message,
SignalServiceMessageSender.IndividualSendEvents.EMPTY, SignalServiceMessageSender.IndividualSendEvents.EMPTY,
false,
false)); false));
} }
@ -602,7 +604,8 @@ public class SendHelper {
ContentHint.RESENDABLE, ContentHint.RESENDABLE,
message, message,
SignalServiceMessageSender.IndividualSendEvents.EMPTY, SignalServiceMessageSender.IndividualSendEvents.EMPTY,
urgent)); urgent,
false));
messageSendLogStore.insertIfPossible(message.getTimestamp(), result, ContentHint.RESENDABLE, urgent); messageSendLogStore.insertIfPossible(message.getTimestamp(), result, ContentHint.RESENDABLE, urgent);
handleSendMessageResult(result); handleSendMessageResult(result);
return result; return result;

View file

@ -7,6 +7,7 @@ import org.asamk.signal.manager.groups.GroupId;
import org.asamk.signal.manager.storage.SignalAccount; import org.asamk.signal.manager.storage.SignalAccount;
import org.asamk.signal.manager.storage.recipients.Contact; import org.asamk.signal.manager.storage.recipients.Contact;
import org.asamk.signal.manager.storage.recipients.Profile; import org.asamk.signal.manager.storage.recipients.Profile;
import org.asamk.signal.manager.storage.recipients.RecipientAddress;
import org.signal.libsignal.protocol.IdentityKey; import org.signal.libsignal.protocol.IdentityKey;
import org.signal.libsignal.protocol.InvalidKeyException; import org.signal.libsignal.protocol.InvalidKeyException;
import org.signal.libsignal.zkgroup.InvalidInputException; import org.signal.libsignal.zkgroup.InvalidInputException;
@ -100,7 +101,8 @@ public class StorageHelper {
} }
final var contactRecord = record.getContact().get(); final var contactRecord = record.getContact().get();
final var address = contactRecord.getAddress(); final var address = new RecipientAddress(contactRecord.getServiceId().uuid(),
contactRecord.getNumber().orElse(null));
final var recipientId = account.getRecipientResolver().resolveRecipient(address); final var recipientId = account.getRecipientResolver().resolveRecipient(address);
final var contact = account.getContactStore().getContact(recipientId); final var contact = account.getContactStore().getContact(recipientId);

View file

@ -45,10 +45,9 @@ public class MessageCacheUtils {
content = new byte[contentLen]; content = new byte[contentLen];
in.readFully(content); in.readFully(content);
} }
byte[] legacyMessage = null;
var legacyMessageLen = in.readInt(); var legacyMessageLen = in.readInt();
if (legacyMessageLen > 0) { if (legacyMessageLen > 0) {
legacyMessage = new byte[legacyMessageLen]; byte[] legacyMessage = new byte[legacyMessageLen];
in.readFully(legacyMessage); in.readFully(legacyMessage);
} }
long serverReceivedTimestamp = 0; long serverReceivedTimestamp = 0;
@ -75,7 +74,6 @@ public class MessageCacheUtils {
addressOptional, addressOptional,
sourceDevice, sourceDevice,
timestamp, timestamp,
legacyMessage,
content, content,
serverReceivedTimestamp, serverReceivedTimestamp,
serverDeliveredTimestamp, serverDeliveredTimestamp,
@ -90,7 +88,7 @@ public class MessageCacheUtils {
try (var out = new DataOutputStream(f)) { try (var out = new DataOutputStream(f)) {
out.writeInt(6); // version out.writeInt(6); // version
out.writeInt(envelope.getType()); out.writeInt(envelope.getType());
out.writeUTF(envelope.getSourceE164().isPresent() ? envelope.getSourceE164().get() : ""); out.writeUTF(""); // legacy number
out.writeUTF(envelope.getSourceUuid().isPresent() ? envelope.getSourceUuid().get() : ""); out.writeUTF(envelope.getSourceUuid().isPresent() ? envelope.getSourceUuid().get() : "");
out.writeInt(envelope.getSourceDevice()); out.writeInt(envelope.getSourceDevice());
out.writeUTF(envelope.getDestinationUuid() == null ? "" : envelope.getDestinationUuid()); out.writeUTF(envelope.getDestinationUuid() == null ? "" : envelope.getDestinationUuid());
@ -101,12 +99,7 @@ public class MessageCacheUtils {
} else { } else {
out.writeInt(0); out.writeInt(0);
} }
if (envelope.hasLegacyMessage()) { out.writeInt(0); // legacy message
out.writeInt(envelope.getLegacyMessage().length);
out.write(envelope.getLegacyMessage());
} else {
out.writeInt(0);
}
out.writeLong(envelope.getServerReceivedTimestamp()); out.writeLong(envelope.getServerReceivedTimestamp());
var uuid = envelope.getServerGuid(); var uuid = envelope.getServerGuid();
out.writeUTF(uuid == null ? "" : uuid); out.writeUTF(uuid == null ? "" : uuid);

View file

@ -29,7 +29,7 @@ public class LogConfigurator extends ContextAwareBase implements Configurator {
LogConfigurator.logFile = logFile; LogConfigurator.logFile = logFile;
} }
public void configure(LoggerContext lc) { public ExecutionStatus configure(LoggerContext lc) {
final var rootLogger = lc.getLogger(Logger.ROOT_LOGGER_NAME); final var rootLogger = lc.getLogger(Logger.ROOT_LOGGER_NAME);
final var defaultLevel = verboseLevel > 1 ? Level.ALL : verboseLevel > 0 ? Level.DEBUG : Level.INFO; final var defaultLevel = verboseLevel > 1 ? Level.ALL : verboseLevel > 0 ? Level.DEBUG : Level.INFO;
@ -63,6 +63,7 @@ public class LogConfigurator extends ContextAwareBase implements Configurator {
final var fileAppender = createLoggingFileAppender(lc, createLayoutWrappingEncoder(fileLayout)); final var fileAppender = createLoggingFileAppender(lc, createLayoutWrappingEncoder(fileLayout));
rootLogger.addAppender(fileAppender); rootLogger.addAppender(fileAppender);
} }
return ExecutionStatus.DO_NOT_INVOKE_NEXT_IF_ANY;
} }
private ConsoleAppender<ILoggingEvent> createLoggingConsoleAppender( private ConsoleAppender<ILoggingEvent> createLoggingConsoleAppender(