refac: scope ydoc update save scheduling to note documents (#30395)

The ydoc document update handler now schedules the debounced save only for note documents, since notes are the only ydoc documents with a save handler.
This commit is contained in:
Classic298
2026-09-23 23:30:21 -04:00
committed by GitHub
parent 53c7ed3370
commit b3bb82e776
+1 -1
View File
@@ -890,7 +890,7 @@ async def yjs_document_update(sid, data):
await asyncio.sleep(0.5)
await document_save_handler(document_id, data.get('data', {}), user)
if data.get('data'):
if document_id.startswith('note:') and data.get('data'):
# Only drop the pending save when a new one takes its place.
# Updates without a content snapshot (the resync a client sends
# after rejoining a document) would otherwise cancel the pending