Update libsignal-service

This commit is contained in:
AsamK committed 2025-10-25 11:31:48 +02:00
1 parent 1fcedca0f1
commit cad61dae37
6 files changed
+13 -10

No files matched your search

@@ -627,7 +627,7 @@ public record MessageEnvelope(
RecipientResolver recipientResolver,
RecipientAddressResolver addressResolver
) {
return new Read(addressResolver.resolveRecipientAddress(recipientResolver.resolveRecipient(readMessage.getSender()))
return new Read(addressResolver.resolveRecipientAddress(recipientResolver.resolveRecipient(readMessage.getSenderAci()))
.toApiRecipientAddress(), readMessage.getTimestamp());
}
}
@@ -86,7 +86,7 @@ public class SyncHelper {
.sendSyncMessage(SignalServiceSyncMessage.forFetchLatest(SignalServiceSyncMessage.FetchType.STORAGE_MANIFEST));
}
public void sendSyncReceiptMessage(ServiceId sender, SignalServiceReceiptMessage receiptMessage) {
public void sendSyncReceiptMessage(ServiceId.ACI sender, SignalServiceReceiptMessage receiptMessage) {
if (receiptMessage.isReadReceipt()) {
final var readMessages = receiptMessage.getTimestamps()
.stream()
@@ -760,11 +760,9 @@ public class ManagerImpl implements Manager {
final var recipientId = context.getRecipientHelper().resolveRecipient(sender);
final var result = context.getSendHelper().sendReceiptMessage(receiptMessage, recipientId);
final var serviceId = account.getRecipientAddressResolver()
.resolveRecipientAddress(recipientId)
.serviceId();
if (serviceId.isPresent()) {
context.getSyncHelper().sendSyncReceiptMessage(serviceId.get(), receiptMessage);
final var aci = account.getRecipientAddressResolver().resolveRecipientAddress(recipientId).aci();
if (aci.isPresent()) {
context.getSyncHelper().sendSyncReceiptMessage(aci.get(), receiptMessage);
}
return new SendMessageResults(timestamp, Map.of(sender, List.of(toSendMessageResult(result))));
} catch (UnregisteredRecipientException e) {
@@ -85,7 +85,12 @@ public class LegacyJsonIdentityKeyStore {
JsonNode node = jsonParser.getCodec().readTree(jsonParser);
var localRegistrationId = node.get("registrationId").asInt();
var identityKeyPair = new IdentityKeyPair(Base64.getDecoder().decode(node.get("identityKey").asText()));
IdentityKeyPair identityKeyPair = null;
try {
identityKeyPair = new IdentityKeyPair(Base64.getDecoder().decode(node.get("identityKey").asText()));
} catch (InvalidKeyException e) {
throw new IOException("Invalid stored identity key pair", e);
}
var identities = new ArrayList<LegacyIdentityInfo>();