Keep all unhandled fields of remote storage record

Fixes #1792
This commit is contained in:
AsamK 2025-06-24 23:13:00 +02:00
parent 5dc66f839d
commit 70c79eac01
4 changed files with 4 additions and 4 deletions

View file

@ -111,7 +111,7 @@ public class AccountRecordProcessor extends DefaultStorageRecordProcessor<Signal
backupsPurchaseToken = IAPSubscriptionId.Companion.from(local.backupSubscriberData); backupsPurchaseToken = IAPSubscriptionId.Companion.from(local.backupSubscriberData);
} }
final var mergedBuilder = SignalAccountRecord.Companion.newBuilder(remote.unknownFields().toByteArray()) final var mergedBuilder = remote.newBuilder()
.givenName(givenName) .givenName(givenName)
.familyName(familyName) .familyName(familyName)
.avatarUrlPath(firstNonEmpty(remote.avatarUrlPath, local.avatarUrlPath)) .avatarUrlPath(firstNonEmpty(remote.avatarUrlPath, local.avatarUrlPath))

View file

@ -172,7 +172,7 @@ public class ContactRecordProcessor extends DefaultStorageRecordProcessor<Signal
e164 = firstNonEmpty(remote.e164, local.e164); e164 = firstNonEmpty(remote.e164, local.e164);
} }
final var mergedBuilder = SignalContactRecord.Companion.newBuilder(remote.unknownFields().toByteArray()) final var mergedBuilder = remote.newBuilder()
.aci(local.aci.isEmpty() ? remote.aci : local.aci) .aci(local.aci.isEmpty() ? remote.aci : local.aci)
.e164(e164) .e164(e164)
.pni(pni) .pni(pni)

View file

@ -74,7 +74,7 @@ public final class GroupV1RecordProcessor extends DefaultStorageRecordProcessor<
final var remote = remoteRecord.getProto(); final var remote = remoteRecord.getProto();
final var local = localRecord.getProto(); final var local = localRecord.getProto();
final var mergedBuilder = SignalGroupV1Record.Companion.newBuilder(remote.unknownFields().toByteArray()) final var mergedBuilder = remote.newBuilder()
.id(remote.id) .id(remote.id)
.blocked(remote.blocked) .blocked(remote.blocked)
.whitelisted(remote.whitelisted) .whitelisted(remote.whitelisted)

View file

@ -53,7 +53,7 @@ public final class GroupV2RecordProcessor extends DefaultStorageRecordProcessor<
final var remote = remoteRecord.getProto(); final var remote = remoteRecord.getProto();
final var local = localRecord.getProto(); final var local = localRecord.getProto();
final var mergedBuilder = SignalGroupV2Record.Companion.newBuilder(remote.unknownFields().toByteArray()) final var mergedBuilder = remote.newBuilder()
.masterKey(remote.masterKey) .masterKey(remote.masterKey)
.blocked(remote.blocked) .blocked(remote.blocked)
.whitelisted(remote.whitelisted) .whitelisted(remote.whitelisted)