mirror of
https://github.com/AsamK/signal-cli.git
synced 2026-11-29 08:55:48 +00:00
Update libsignal-service
This commit is contained in:
1 parent
d27aea2220
commit
91701f609a
5 files changed
+16
-6
No files matched your search
@@ -154,7 +154,7 @@ public class SyncHelper {
|
||||
|
||||
try {
|
||||
try (OutputStream fos = new FileOutputStream(contactsFile)) {
|
||||
var out = new DeviceContactsOutputStream(fos);
|
||||
var out = new DeviceContactsOutputStream(fos, false);
|
||||
for (var contactPair : account.getContactStore().getContacts()) {
|
||||
final var recipientId = contactPair.first();
|
||||
final var contact = contactPair.second();
|
||||
|
||||
@@ -328,7 +328,8 @@ public class SignalDependencies {
|
||||
Optional.empty(),
|
||||
executor,
|
||||
ServiceConfig.MAX_ENVELOPE_SIZE,
|
||||
() -> true));
|
||||
() -> true,
|
||||
false));
|
||||
}
|
||||
|
||||
public List<SecureValueRecovery> getSecureValueRecovery() {
|
||||
|
||||
@@ -178,8 +178,10 @@ public class ContactRecordProcessor extends DefaultStorageRecordProcessor<Signal
|
||||
: remote.profileKey;
|
||||
final var mergedBuilder = remote.newBuilder()
|
||||
.aci(local.aci.isEmpty() ? remote.aci : local.aci)
|
||||
.aciBinary(firstNonEmpty(local.aciBinary, remote.aciBinary))
|
||||
.e164(e164)
|
||||
.pni(pni)
|
||||
.pniBinary(pni.isEmpty() ? ByteString.EMPTY : PNI.parseOrThrow(pni).toByteStringWithoutPrefix())
|
||||
.givenName(profileGivenName)
|
||||
.familyName(profileFamilyName)
|
||||
.systemGivenName(account.isPrimaryDevice() ? local.systemGivenName : remote.systemGivenName)
|
||||
@@ -335,9 +337,16 @@ public class ContactRecordProcessor extends DefaultStorageRecordProcessor<Signal
|
||||
public int compare(SignalContactRecord lhsRecord, SignalContactRecord rhsRecord) {
|
||||
final var lhs = lhsRecord.getProto();
|
||||
final var rhs = rhsRecord.getProto();
|
||||
if ((!lhs.aci.isEmpty() && Objects.equals(lhs.aci, rhs.aci)) || (
|
||||
if ((
|
||||
(!lhs.aci.isEmpty() && Objects.equals(lhs.aci, rhs.aci)) || (
|
||||
lhs.aciBinary.size() != 0 && Objects.equals(lhs.aciBinary, rhs.aciBinary)
|
||||
)
|
||||
) || (
|
||||
!lhs.e164.isEmpty() && Objects.equals(lhs.e164, rhs.e164)
|
||||
) || (!lhs.pni.isEmpty() && Objects.equals(lhs.pni, rhs.pni))) {
|
||||
) || (
|
||||
(!lhs.pni.isEmpty() && Objects.equals(lhs.pni, rhs.pni) && lhs.pniBinary == rhs.pniBinary)
|
||||
|| (lhs.pniBinary.size() != 0 && Objects.equals(lhs.pniBinary, rhs.pniBinary))
|
||||
)) {
|
||||
return 0;
|
||||
} else {
|
||||
return 1;
|
||||
|
||||
Reference in new issue
Block a user