Update libsignal-service

This commit is contained in:
AsamK 2024-02-18 15:16:41 +01:00
parent ed4b1e8f02
commit bd792f5b7f
4 changed files with 11 additions and 10 deletions

View file

@ -481,7 +481,7 @@ public record MessageEnvelope(
) { ) {
static Address from(org.whispersystems.signalservice.api.messages.shared.SharedContact.PostalAddress address) { static Address from(org.whispersystems.signalservice.api.messages.shared.SharedContact.PostalAddress address) {
return new Address(Address.Type.from(address.getType()), return new Address(Type.from(address.getType()),
address.getLabel(), address.getLabel(),
address.getStreet(), address.getStreet(),
address.getPobox(), address.getPobox(),
@ -690,7 +690,9 @@ public record MessageEnvelope(
DELETE, DELETE,
BLOCK, BLOCK,
BLOCK_AND_DELETE, BLOCK_AND_DELETE,
UNBLOCK_AND_ACCEPT; UNBLOCK_AND_ACCEPT,
SPAM,
BLOCK_AND_SPAM;
static Type from(MessageRequestResponseMessage.Type type) { static Type from(MessageRequestResponseMessage.Type type) {
return switch (type) { return switch (type) {
@ -700,6 +702,8 @@ public record MessageEnvelope(
case BLOCK -> BLOCK; case BLOCK -> BLOCK;
case BLOCK_AND_DELETE -> BLOCK_AND_DELETE; case BLOCK_AND_DELETE -> BLOCK_AND_DELETE;
case UNBLOCK_AND_ACCEPT -> UNBLOCK_AND_ACCEPT; case UNBLOCK_AND_ACCEPT -> UNBLOCK_AND_ACCEPT;
case SPAM -> SPAM;
case BLOCK_AND_SPAM -> BLOCK_AND_SPAM;
}; };
} }
} }

View file

@ -158,7 +158,7 @@ public class RecipientHelper {
private Map<String, RegisteredUser> getRegisteredUsers( private Map<String, RegisteredUser> getRegisteredUsers(
final Set<String> numbers, final boolean isPartialRefresh final Set<String> numbers, final boolean isPartialRefresh
) throws IOException { ) throws IOException {
Map<String, RegisteredUser> registeredUsers = getRegisteredUsersV2(numbers, isPartialRefresh, true); Map<String, RegisteredUser> registeredUsers = getRegisteredUsersV2(numbers, isPartialRefresh);
// Store numbers as recipients, so we have the number/uuid association // Store numbers as recipients, so we have the number/uuid association
registeredUsers.forEach((number, u) -> account.getRecipientTrustedResolver() registeredUsers.forEach((number, u) -> account.getRecipientTrustedResolver()
@ -186,7 +186,7 @@ public class RecipientHelper {
} }
private Map<String, RegisteredUser> getRegisteredUsersV2( private Map<String, RegisteredUser> getRegisteredUsersV2(
final Set<String> numbers, boolean isPartialRefresh, boolean useCompat final Set<String> numbers, boolean isPartialRefresh
) throws IOException { ) throws IOException {
final var previousNumbers = isPartialRefresh ? Set.<String>of() : account.getCdsiStore().getAllNumbers(); final var previousNumbers = isPartialRefresh ? Set.<String>of() : account.getCdsiStore().getAllNumbers();
final var newNumbers = new HashSet<>(numbers) {{ final var newNumbers = new HashSet<>(numbers) {{
@ -210,7 +210,6 @@ public class RecipientHelper {
.getRegisteredUsersWithCdsi(previousNumbers, .getRegisteredUsersWithCdsi(previousNumbers,
newNumbers, newNumbers,
account.getRecipientStore().getServiceIdToProfileKeyMap(), account.getRecipientStore().getServiceIdToProfileKeyMap(),
useCompat,
token, token,
serviceEnvironmentConfig.cdsiMrenclave(), serviceEnvironmentConfig.cdsiMrenclave(),
null, null,

View file

@ -102,10 +102,8 @@ public class AccountRecordProcessor extends DefaultStorageRecordProcessor<Signal
final var storiesDisabled = remote.isStoriesDisabled(); final var storiesDisabled = remote.isStoriesDisabled();
final var hasSeenGroupStoryEducation = remote.hasSeenGroupStoryEducationSheet() final var hasSeenGroupStoryEducation = remote.hasSeenGroupStoryEducationSheet()
|| local.hasSeenGroupStoryEducationSheet(); || local.hasSeenGroupStoryEducationSheet();
final var username = remote.getUsername() != null && !remote.getUsername().isEmpty() final var username = remote.getUsername();
? remote.getUsername() final var usernameLink = remote.getUsernameLink();
: local.getUsername();
final var usernameLink = remote.getUsernameLink() != null ? remote.getUsernameLink() : local.getUsernameLink();
final var mergedBuilder = new SignalAccountRecord.Builder(remote.getId().getRaw(), unknownFields).setGivenName( final var mergedBuilder = new SignalAccountRecord.Builder(remote.getId().getRaw(), unknownFields).setGivenName(
givenName) givenName)

View file

@ -15,7 +15,7 @@ dependencyResolutionManagement {
library("slf4j.jul", "org.slf4j", "jul-to-slf4j").versionRef("slf4j") library("slf4j.jul", "org.slf4j", "jul-to-slf4j").versionRef("slf4j")
library("logback", "ch.qos.logback", "logback-classic").version("1.4.14") library("logback", "ch.qos.logback", "logback-classic").version("1.4.14")
library("signalservice", "com.github.turasa", "signal-service-java").version("2.15.3_unofficial_95") library("signalservice", "com.github.turasa", "signal-service-java").version("2.15.3_unofficial_96")
library("sqlite", "org.xerial", "sqlite-jdbc").version("3.45.1.0") library("sqlite", "org.xerial", "sqlite-jdbc").version("3.45.1.0")
library("hikari", "com.zaxxer", "HikariCP").version("5.1.0") library("hikari", "com.zaxxer", "HikariCP").version("5.1.0")
library("junit.jupiter", "org.junit.jupiter", "junit-jupiter").version("5.10.2") library("junit.jupiter", "org.junit.jupiter", "junit-jupiter").version("5.10.2")