|
|
@ -122,7 +122,7 @@ public class MultiDeviceContactUpdateJob extends BaseJob implements InjectableTy
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (address == null) generateFullContactUpdate();
|
|
|
|
if (address == null) generateFullContactUpdate();
|
|
|
|
else if (SyncMessagesProtocol.shouldSyncContact(context, Address.fromSerialized(address))) generateSingleContactUpdate(Address.fromSerialized(address));
|
|
|
|
else if (SyncMessagesProtocol.shouldSyncContact(context, address)) generateSingleContactUpdate(Address.fromSerialized(address));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void generateSingleContactUpdate(@NonNull Address address)
|
|
|
|
private void generateSingleContactUpdate(@NonNull Address address)
|
|
|
@ -139,7 +139,7 @@ public class MultiDeviceContactUpdateJob extends BaseJob implements InjectableTy
|
|
|
|
Optional<IdentityDatabase.IdentityRecord> identityRecord = DatabaseFactory.getIdentityDatabase(context).getIdentity(address);
|
|
|
|
Optional<IdentityDatabase.IdentityRecord> identityRecord = DatabaseFactory.getIdentityDatabase(context).getIdentity(address);
|
|
|
|
Optional<VerifiedMessage> verifiedMessage = getVerifiedMessage(recipient, identityRecord);
|
|
|
|
Optional<VerifiedMessage> verifiedMessage = getVerifiedMessage(recipient, identityRecord);
|
|
|
|
|
|
|
|
|
|
|
|
if (SyncMessagesProtocol.shouldSyncContact(context, address)) {
|
|
|
|
if (SyncMessagesProtocol.shouldSyncContact(context, address.serialize())) {
|
|
|
|
out.write(new DeviceContact(address.toPhoneString(),
|
|
|
|
out.write(new DeviceContact(address.toPhoneString(),
|
|
|
|
Optional.fromNullable(recipient.getName()),
|
|
|
|
Optional.fromNullable(recipient.getName()),
|
|
|
|
getAvatar(recipient.getContactUri()),
|
|
|
|
getAvatar(recipient.getContactUri()),
|
|
|
|