Skip to content

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

fix: resolved notes get conflicted again on sync

thecodrre7ce8dbf2b30
diff --git a/packages/core/collections/content.js b/packages/core/collections/content.js
index 8ff1125ea..9fbdfa8aa 100644
--- a/packages/core/collections/content.js
+++ b/packages/core/collections/content.js
@@ -17,7 +17,8 @@ export default class Content {
noteId: content.noteId,
id,
data: content.data || content,
- conflicted: content.conflicted || false
+ conflicted: !!content.conflicted,
+ resolved: !!content.resolved,
});
return id;
}
diff --git a/packages/core/collections/notes.js b/packages/core/collections/notes.js
index 67161882d..7d69e715c 100644
--- a/packages/core/collections/notes.js
+++ b/packages/core/collections/notes.js
@@ -79,7 +79,9 @@ export default class Notes {
deltaId = await this._deltaCollection.add({
noteId: id,
id: deltaId,
- data: delta,
+ data: delta.data || delta,
+ conflicted: delta.conflicted,
+ resolved: delta.resolved,
});
}
@@ -107,7 +109,6 @@ export default class Notes {
headline: note.headline,
dateCreated: note.dateCreated,
conflicted: !!note.conflicted,
- resolved: !!note.resolved
};
if (!oldNote) {