diff options
Diffstat (limited to 'src/main/overleafSocket.ts')
| -rw-r--r-- | src/main/overleafSocket.ts | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/main/overleafSocket.ts b/src/main/overleafSocket.ts index 195eb05..96d9138 100644 --- a/src/main/overleafSocket.ts +++ b/src/main/overleafSocket.ts @@ -301,11 +301,8 @@ export class OverleafSocket extends EventEmitter { this.joinedDocs.delete(docId) } - async applyOtUpdate(docId: string, ops: unknown[], version: number, hash: string): Promise<void> { - // Use emitWithAck so the server's callback response comes back as a Socket.IO ack - // Do NOT send hash — Overleaf's document-updater hash check causes disconnect + rollback on mismatch - const result = await this.emitWithAck('applyOtUpdate', [docId, { doc: docId, op: ops, v: version }]) - if (result) console.log(`[applyOtUpdate] ack for ${docId} v=${version}`) + async applyOtUpdate(docId: string, ops: unknown[], version: number, hash?: string): Promise<void> { + await this.emitWithAck('applyOtUpdate', [docId, { doc: docId, op: ops, v: version }]) } /** Get list of connected users with their cursor positions */ |
