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
fix for non-sync WS messages
azivnercf7ab2b8d67d
diff --git a/public/javascripts/messaging.js b/public/javascripts/messaging.jsindex 8419110f24..d22dd53974 100644--- a/public/javascripts/messaging.js+++ b/public/javascripts/messaging.js@@ -19,14 +19,14 @@ const messaging = (function() {function messageHandler(event) {const message = JSON.parse(event.data);- if (message.data.length > 0) {- console.log(message);- }-if (message.type === 'sync') {lastPingTs = new Date().getTime();const syncData = message.data.filter(sync => sync.source_id !== glob.sourceId);+ if (syncData.length > 0) {+ console.log("Sync data: ", message);+ }+if (syncData.some(sync => sync.entity_name === 'notes_tree')) {console.log("Reloading tree because of background changes");diff --git a/services/build.js b/services/build.jsindex f4d0bcd9d8..c81431f8b9 100644--- a/services/build.js+++ b/services/build.js@@ -1 +1 @@-module.exports = { build_date:"2017-12-16T12:22:45-05:00", build_revision: "0c0e95b91e6d42c9aaf7921d83630ab36a41e0ae" };+module.exports = { build_date:"2017-12-16T21:37:48-05:00", build_revision: "ccc7775c7cff5cdfcad1102ec6ca1ab15612c851" };diff --git a/views/index.ejs b/views/index.ejsindex 279a1e2f7a..2e807e7a57 100644--- a/views/index.ejs+++ b/views/index.ejs@@ -93,7 +93,7 @@<input autocomplete="off" value="" id="note-title" style="font-size: x-large; border: 0; flex-grow: 100;" tabindex="1">- <button class="btn btn-xs" style="margin-right: 10px;" onclick="noteHistory.showCurrentNoteHistory();">Note history</button>+ <button class="btn btn-xs" style="margin: 10px;" onclick="noteHistory.showCurrentNoteHistory();">Note history</button></div></div>