Merge pull request #17713 from overleaf/em-resync-include-ranges

Add ranges to resync doc update

GitOrigin-RevId: 6998b952028a154c21c8f476e0504496019aea9c
This commit is contained in:
Eric Mc Sween 2024-04-08 11:07:48 -04:00 committed by Copybot
parent 8e662b33fb
commit 5d2aed3b1c
2 changed files with 6 additions and 0 deletions

View file

@ -168,6 +168,11 @@ const ProjectHistoryRedisManager = {
ts: new Date(),
},
}
if (historyRangesSupport) {
projectUpdate.resyncDocContent.ranges = ranges
}
const jsonUpdate = JSON.stringify(projectUpdate)
// Do an optimised size check on the docLines using the serialised
// project update length as an upper bound

View file

@ -260,6 +260,7 @@ describe('ProjectHistoryRedisManager', function () {
resyncDocContent: {
content: 'onedeleted\ntwo',
version: this.version,
ranges: this.ranges,
},
projectHistoryId: this.projectHistoryId,
path: this.pathname,