Change ContactRecordProcess to merge identity key/state as a group.

This commit is contained in:
Greyson Parrelli
2022-04-12 13:27:22 -04:00
parent 26d637cafc
commit 27c3fca324

View File

@@ -104,7 +104,7 @@ public class ContactRecordProcessor extends DefaultStorageRecordProcessor<Signal
SignalServiceAddress address = new SignalServiceAddress(serviceId, e164);
byte[] profileKey = OptionalUtil.or(remote.getProfileKey(), local.getProfileKey()).orElse(null);
String username = OptionalUtil.or(remote.getUsername(), local.getUsername()).orElse("");
IdentityState identityState = remote.getIdentityState();
IdentityState identityState = remote.getIdentityKey().isPresent() ? remote.getIdentityState() : local.getIdentityState();
byte[] identityKey = OptionalUtil.or(remote.getIdentityKey(), local.getIdentityKey()).orElse(null);
boolean blocked = remote.isBlocked();
boolean profileSharing = remote.isProfileSharingEnabled();