Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

fix: include uploading att. in partial sync

thecodrr954de78de459
diff --git a/packages/core/api/sync/index.js b/packages/core/api/sync/index.js
index a40f53bf7..1ae7ad88c 100644
--- a/packages/core/api/sync/index.js
+++ b/packages/core/api/sync/index.js
@@ -109,19 +109,17 @@ export default class Sync {
let { lastSynced } = await this._performChecks();
if (force) lastSynced = 0;
- if (full) {
- // We request and merge remote attachments beforehand to handle
- // all possible conflicts that will occur if a user attaches
- // the same file/image on both his devices. Since both files
- // will have the same hash but different encryption key, it
- // will cause problems on the local device.
- await this._mergeAttachments(lastSynced);
-
- // All pending attachments are uploaded before anything else.
- // This is done to ensure that when any note arrives on user's
- // device, its attachments can be downloaded.
- await this._uploadAttachments();
- }
+ // We request and merge remote attachments beforehand to handle
+ // all possible conflicts that will occur if a user attaches
+ // the same file/image on both his devices. Since both files
+ // will have the same hash but different encryption key, it
+ // will cause problems on the local device.
+ await this._mergeAttachments(lastSynced);
+
+ // All pending attachments are uploaded before anything else.
+ // This is done to ensure that when any note arrives on user's
+ // device, its attachments can be downloaded.
+ await this._uploadAttachments();
// We collect, encrypt, and ready local changes before asking
// the server for remote changes. This is done to ensure we