From fed2c94431327b71d36ab4306281dee8d83a653a Mon Sep 17 00:00:00 2001 From: AsamK Date: Sun, 24 Sep 2023 18:03:38 +0200 Subject: [PATCH] Update libsignal-service --- .../helper/IncomingMessageHandler.java | 20 +++++-------------- settings.gradle.kts | 2 +- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/lib/src/main/java/org/asamk/signal/manager/helper/IncomingMessageHandler.java b/lib/src/main/java/org/asamk/signal/manager/helper/IncomingMessageHandler.java index aa4bdba3a4..51b7c5233a 100644 --- a/lib/src/main/java/org/asamk/signal/manager/helper/IncomingMessageHandler.java +++ b/lib/src/main/java/org/asamk/signal/manager/helper/IncomingMessageHandler.java @@ -60,7 +60,6 @@ import org.whispersystems.signalservice.api.messages.SignalServiceGroup; import org.whispersystems.signalservice.api.messages.SignalServiceGroupContext; import org.whispersystems.signalservice.api.messages.SignalServiceGroupV2; -import org.whispersystems.signalservice.api.messages.SignalServiceMetadata; import org.whispersystems.signalservice.api.messages.SignalServicePniSignatureMessage; import org.whispersystems.signalservice.api.messages.SignalServiceReceiptMessage; import org.whispersystems.signalservice.api.messages.SignalServiceStoryMessage; @@ -228,20 +227,11 @@ private SignalServiceContent validate( return null; } - final var localAddress = new SignalServiceAddress(envelopeMetadata.getDestinationServiceId(), - Optional.ofNullable(account.getNumber())); - final var metadata = new SignalServiceMetadata(new SignalServiceAddress(envelopeMetadata.getSourceServiceId(), - Optional.ofNullable(envelopeMetadata.getSourceE164())), - envelopeMetadata.getSourceDeviceId(), - envelope.timestamp, - envelope.serverTimestamp, - serverDeliveredTimestamp, - envelopeMetadata.getSealedSender(), - envelope.serverGuid, - Optional.ofNullable(envelopeMetadata.getGroupId()), - envelopeMetadata.getDestinationServiceId().toString()); - - return SignalServiceContent.createFrom(localAddress, metadata, content); + return SignalServiceContent.Companion.createFrom(account.getNumber(), + envelope, + envelopeMetadata, + content, + serverDeliveredTimestamp); } private List checkAndHandleMessage( diff --git a/settings.gradle.kts b/settings.gradle.kts index bb2d1974b2..6cdb74fa41 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -16,7 +16,7 @@ dependencyResolutionManagement { library("logback", "ch.qos.logback", "logback-classic").version("1.4.11") - library("signalservice", "com.github.turasa", "signal-service-java").version("2.15.3_unofficial_81") + library("signalservice", "com.github.turasa", "signal-service-java").version("2.15.3_unofficial_82") library("sqlite", "org.xerial", "sqlite-jdbc").version("3.43.0.0") library("hikari", "com.zaxxer", "HikariCP").version("5.0.1") library("junit", "org.junit.jupiter", "junit-jupiter").version("5.10.0")