Reduce the amount of storage service conflicts

This commit is contained in:
Josh Perez 2021-08-23 19:17:36 -04:00 committed by GitHub
parent 52328c2634
commit 4371996362
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -374,20 +374,7 @@ function doRecordsConflict(
): boolean {
const idForLogging = conversation.idForLogging();
const localKeys = Object.keys(localRecord);
const remoteKeys = Object.keys(remoteRecord);
if (localKeys.length !== remoteKeys.length) {
window.log.info(
'storageService.doRecordsConflict: Local keys do not match remote keys',
idForLogging,
localKeys.join(','),
remoteKeys.join(',')
);
return true;
}
return localKeys.some((key: string): boolean => {
return Object.keys(remoteRecord).some((key: string): boolean => {
const localValue = localRecord[key];
const remoteValue = remoteRecord[key];