Populate sourceDevice field of ManifestRecord
This commit is contained in:
parent
68f705e6ad
commit
fcc60202c2
2 changed files with 7 additions and 3 deletions
|
@ -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 {
|
||||
|
|
|
@ -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}`
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in a new issue