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
sync fixes
zadama452e4add5ae
diff --git a/src/becca/entities/bblob.js b/src/becca/entities/bblob.jsindex bb8c186165..74395450c9 100644--- a/src/becca/entities/bblob.js+++ b/src/becca/entities/bblob.js@@ -1,4 +1,8 @@class BBlob {+ static get entityName() { return "blobs"; }+ static get primaryKeyName() { return "blobId"; }+ static get hashedProperties() { return ["blobId", "content"]; }+constructor(row) {/** @type {string} */this.blobId = row.blobId;diff --git a/src/becca/entities/bnote.js b/src/becca/entities/bnote.jsindex 3090f17372..b54108a7a9 100644--- a/src/becca/entities/bnote.js+++ b/src/becca/entities/bnote.js@@ -25,7 +25,7 @@ const RELATION = 'relation';class BNote extends AbstractBeccaEntity {static get entityName() { return "notes"; }static get primaryKeyName() { return "noteId"; }- static get hashedProperties() { return ["noteId", "title", "isProtected", "type", "mime"]; }+ static get hashedProperties() { return ["noteId", "title", "isProtected", "type", "mime", "blobId"]; }constructor(row) {super();diff --git a/src/becca/entities/brevision.js b/src/becca/entities/brevision.jsindex 6433a32cf4..8a856713c2 100644--- a/src/becca/entities/brevision.js+++ b/src/becca/entities/brevision.js@@ -17,7 +17,8 @@ const BAttachment = require("./battachment");class BRevision extends AbstractBeccaEntity {static get entityName() { return "revisions"; }static get primaryKeyName() { return "revisionId"; }- static get hashedProperties() { return ["revisionId", "noteId", "title", "isProtected", "dateLastEdited", "dateCreated", "utcDateLastEdited", "utcDateCreated", "utcDateModified"]; }+ static get hashedProperties() { return ["revisionId", "noteId", "title", "isProtected", "dateLastEdited", "dateCreated",+ "utcDateLastEdited", "utcDateCreated", "utcDateModified", "blobId"]; }constructor(row, titleDecrypted = false) {super();diff --git a/src/becca/entity_constructor.js b/src/becca/entity_constructor.jsindex ea5d934d0f..a50301fce4 100644--- a/src/becca/entity_constructor.js+++ b/src/becca/entity_constructor.js@@ -1,21 +1,23 @@-const BNote = require('./entities/bnote');-const BRevision = require('./entities/brevision.js');const BAttachment = require("./entities/battachment");-const BBranch = require('./entities/bbranch');const BAttribute = require('./entities/battribute');-const BRecentNote = require('./entities/brecent_note');+const BBlob = require("./entities/bblob");+const BBranch = require('./entities/bbranch');const BEtapiToken = require('./entities/betapi_token');+const BNote = require('./entities/bnote');const BOption = require('./entities/boption');+const BRecentNote = require('./entities/brecent_note');+const BRevision = require('./entities/brevision.js');const ENTITY_NAME_TO_ENTITY = {+ "attachments": BAttachment,"attributes": BAttribute,+ "blobs": BBlob,"branches": BBranch,+ "etapi_tokens": BEtapiToken,"notes": BNote,- "revisions": BRevision,- "attachments": BAttachment,+ "options": BOption,"recent_notes": BRecentNote,- "etapi_tokens": BEtapiToken,- "options": BOption+ "revisions": BRevision};function getEntityFromEntityName(entityName) {