diff --git a/protos/SignalStorage.proto b/protos/SignalStorage.proto index 0acc53fd1..f6980b0b6 100644 --- a/protos/SignalStorage.proto +++ b/protos/SignalStorage.proto @@ -45,8 +45,10 @@ message ManifestRecord { optional Type type = 2; } - optional uint64 version = 1; - repeated Identifier keys = 2; + optional uint64 version = 1; + optional uint32 sourceDevice = 3; + repeated Identifier keys = 2; + // Next ID: 4 } message StorageRecord { diff --git a/ts/services/storage.ts b/ts/services/storage.ts index 08c5de203..bee9e2285 100644 --- a/ts/services/storage.ts +++ b/ts/services/storage.ts @@ -498,6 +498,7 @@ async function generateManifest( const manifestRecord = new Proto.ManifestRecord(); manifestRecord.version = Long.fromNumber(version); + manifestRecord.sourceDevice = window.storage.user.getDeviceId() ?? 0; manifestRecord.keys = Array.from(manifestRecordKeys); const storageKeyBase64 = window.storage.get('storageKey'); @@ -1335,7 +1336,8 @@ async function sync( const version = manifest.version?.toNumber() ?? 0; log.info( - `storageService.sync: updating to remoteVersion=${version} from ` + + `storageService.sync: updating to remoteVersion=${version} ` + + `sourceDevice=${manifest.sourceDevice ?? '?'} from ` + `version=${localManifestVersion}` );