mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 02:45:54 +01:00
implemented consistency check for note fulltext based on hashes
This commit is contained in:
@@ -74,7 +74,10 @@ class Note extends Entity {
|
||||
/** @returns {Promise<*>} */
|
||||
async getContent() {
|
||||
if (this.content === undefined) {
|
||||
this.content = await sql.getValue(`SELECT content FROM note_contents WHERE noteId = ?`, [this.noteId]);
|
||||
const res = await sql.getRow(`SELECT content, hash FROM note_contents WHERE noteId = ?`, [this.noteId]);
|
||||
|
||||
this.content = res.content;
|
||||
this.contentHash = res.contentHash; // used only for note_fulltext consistency check
|
||||
|
||||
if (this.isProtected) {
|
||||
if (this.isContentAvailable) {
|
||||
|
||||
Reference in New Issue
Block a user