A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
fix: only sync uploaded attachments
thecodrrc92d08a33131
diff --git a/packages/core/api/sync/collector.js b/packages/core/api/sync/collector.jsindex f0bc06fb5..31682f971 100644--- a/packages/core/api/sync/collector.js+++ b/packages/core/api/sync/collector.js@@ -19,7 +19,9 @@ class Collector {notes: await this._encrypt(this._collect(this._db.notes.raw)),notebooks: await this._encrypt(this._collect(this._db.notebooks.raw)),content: await this._encrypt(this._collect(await this._db.content.all())),- attachments: await this._encrypt(this._collect(this._db.attachments.all)),+ attachments: await this._encrypt(+ this._collect(this._db.attachments.uploaded)+ ),settings: await this._encrypt(this._collect([this._db.settings.raw])),vaultKey: await this._serialize(await this._db.vault._getKey()),};diff --git a/packages/core/collections/attachments.js b/packages/core/collections/attachments.jsindex 29b40e293..2e526eaae 100644--- a/packages/core/collections/attachments.js+++ b/packages/core/collections/attachments.js@@ -295,6 +295,10 @@ export default class Attachments extends Collection {);}+ get uploaded() {+ return this.all.filter((attachment) => attachment.dateUploaded > 0);+ }+get deleted() {return this.all.filter((attachment) => attachment.dateDeleted > 0);}