Merge pull request #17128 from overleaf/em-filter-out-comments

Do not send comments to project-history when ranges support is disabled

GitOrigin-RevId: 0c5e5e2c98ea3c2830ba4d5d114bf4730b440440
This commit is contained in:
Eric Mc Sween
2024-02-19 09:04:00 +00:00
committed by Copybot
parent 8c339045b3
commit b55bdf7ced
6 changed files with 226 additions and 181 deletions
@@ -722,7 +722,7 @@ export class DocumentContainer extends EventEmitter {
this.emit('ranges:clear')
this.ranges!.changes = changes
this.ranges!.comments = comments
this.ranges!.track_changes = this.doc?.track_changes
this.ranges!.track_changes = this.doc?.track_changes ?? false
for (const op of this.filterOps(this.doc?.getInflightOp() || [])) {
this.ranges!.setIdSeed(this.doc?.track_changes_id_seeds?.inflight)
this.ranges!.applyOp(op, { user_id: this.track_changes_as })