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
not creating note history immediatelly after creating a note since it's empty at that point which is useless
azivner81719f84a0a7
diff --git a/services/notes.js b/services/notes.jsindex c54f0dfe31..95e8cc4fb0 100644--- a/services/notes.js+++ b/services/notes.js@@ -150,7 +150,7 @@ async function updateNote(noteId, newNote, ctx) {const existingNoteHistoryId = await sql.getSingleValue("SELECT note_history_id FROM notes_history WHERE note_id = ? AND date_modified_from >= ?", [noteId, historyCutoff]);await sql.doInTransaction(async () => {- if (!existingNoteHistoryId) {+ if (!existingNoteHistoryId && (now - newNote.detail.date_created) >= historySnapshotTimeInterval) {const newNoteHistoryId = utils.newNoteHistoryId();await sql.insert('notes_history', {