Only sync e164 if pni is also present

This commit is contained in:
AsamK 2026-07-11 14:00:43 +02:00
parent c95a67862e
commit 2a744edd43

View File

@ -92,8 +92,10 @@ public final class StorageSyncModels {
public static ContactRecord localToRemoteRecord(Recipient recipient, IdentityInfo identity) {
final var address = recipient.getAddress();
final var pniPresent = address.pni().isPresent();
final var builder = SignalContactRecord.Companion.newBuilder(recipient.getStorageRecord())
.e164(address.number().orElse(""))
.e164(pniPresent ? address.number().orElse("") : "")
.username(address.username().orElse(""))
.profileKey(recipient.getProfileKey() == null
? ByteString.EMPTY