Ensure new manifest is saved after rotation.

This commit is contained in:
Greyson Parrelli 2025-01-06 12:27:06 -05:00
parent 3af3da6b60
commit 6643256d54

View file

@ -90,6 +90,10 @@ class StorageRotateManifestJob private constructor(parameters: Parameters) : Job
StorageServiceRepository.WriteStorageRecordsResult.Success -> { StorageServiceRepository.WriteStorageRecordsResult.Success -> {
Log.i(TAG, "Successfully rotated the manifest as version ${manifestWithNewVersion.version}.${manifestWithNewVersion.sourceDeviceId}. Clearing restore key.") Log.i(TAG, "Successfully rotated the manifest as version ${manifestWithNewVersion.version}.${manifestWithNewVersion.sourceDeviceId}. Clearing restore key.")
SignalStore.svr.masterKeyForInitialDataRestore = null SignalStore.svr.masterKeyForInitialDataRestore = null
Log.i(TAG, "Saved new manifest. Now at version: ${manifestWithNewVersion.versionString}")
SignalStore.storageService.manifest = manifestWithNewVersion
Result.success() Result.success()
} }
StorageServiceRepository.WriteStorageRecordsResult.ConflictError -> { StorageServiceRepository.WriteStorageRecordsResult.ConflictError -> {