Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
force note sync now syncs also note revision contents and attributes
zadamd93b9b8a230e
diff --git a/src/routes/api/sync.js b/src/routes/api/sync.jsindex fcef458fe4..8bc9195661 100644--- a/src/routes/api/sync.js+++ b/src/routes/api/sync.js@@ -77,12 +77,17 @@ async function forceNoteSync(req) {await syncTableService.addNoteSync(noteId);await syncTableService.addNoteContentSync(noteId);- for (const branchId of await sql.getColumn("SELECT branchId FROM branches WHERE isDeleted = 0 AND noteId = ?", [noteId])) {+ for (const branchId of await sql.getColumn("SELECT branchId FROM branches WHERE noteId = ?", [noteId])) {await syncTableService.addBranchSync(branchId);}+ for (const attributeId of await sql.getColumn("SELECT attributeId FROM attributes WHERE noteId = ?", [noteId])) {+ await syncTableService.addAttributeSync(attributeId);+ }+for (const noteRevisionId of await sql.getColumn("SELECT noteRevisionId FROM note_revisions WHERE noteId = ?", [noteId])) {await syncTableService.addNoteRevisionSync(noteRevisionId);+ await syncTableService.addNoteRevisionContentSync(noteRevisionId);}await syncTableService.addRecentNoteSync(noteId);