Fix case where we were performing remote inserts.
This commit is contained in:
parent
a02d2e467b
commit
3f81a94176
2 changed files with 4 additions and 4 deletions
|
@ -89,7 +89,7 @@ public class StorageForcePushJob extends BaseJob {
|
|||
StorageKey storageServiceKey = SignalStore.storageService().getOrCreateStorageKey();
|
||||
SignalServiceAccountManager accountManager = ApplicationDependencies.getSignalServiceAccountManager();
|
||||
RecipientTable recipientTable = SignalDatabase.recipients();
|
||||
UnknownStorageIdTable storageIdDatabase = SignalDatabase.unknownStorageIds();
|
||||
UnknownStorageIdTable storageIdTable = SignalDatabase.unknownStorageIds();
|
||||
|
||||
long currentVersion = accountManager.getStorageManifestVersion();
|
||||
Map<RecipientId, StorageId> oldContactStorageIds = recipientTable.getContactStorageSyncIdsMap();
|
||||
|
@ -134,7 +134,7 @@ public class StorageForcePushJob extends BaseJob {
|
|||
SignalStore.storageService().setManifest(manifest);
|
||||
recipientTable.applyStorageIdUpdates(newContactStorageIds);
|
||||
recipientTable.applyStorageIdUpdates(Collections.singletonMap(Recipient.self().getId(), accountRecord.getId()));
|
||||
storageIdDatabase.deleteAll();
|
||||
storageIdTable.deleteAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -331,7 +331,7 @@ public class StorageSyncJob extends BaseJob {
|
|||
Log.i(TAG, "Removed " + removedUnregistered + " recipients from storage service that have been unregistered for longer than 30 days.");
|
||||
}
|
||||
|
||||
List<StorageId> localStorageIds = getAllLocalStorageIds(self);
|
||||
List<StorageId> localStorageIds = getAllLocalStorageIds(self).stream().filter(it -> !it.isUnknown()).collect(Collectors.toList());
|
||||
IdDifferenceResult idDifference = StorageSyncHelper.findIdDifference(remoteManifest.getStorageIds(), localStorageIds);
|
||||
List<SignalStorageRecord> remoteInserts = buildLocalStorageRecords(context, self, idDifference.getLocalOnlyIds());
|
||||
List<byte[]> remoteDeletes = Stream.of(idDifference.getRemoteOnlyIds()).map(StorageId::getRaw).toList();
|
||||
|
|
Loading…
Add table
Reference in a new issue