cozy-labs / cozy-desktop

File Synchronisation for Cozy on Desktop and Laptop
https://cozy-labs.github.io/cozy-desktop/
GNU Affero General Public License v3.0
98 stars 45 forks source link

core/merge: Update remote metadata of trashed docs #2260

Closed taratatach closed 1 year ago

taratatach commented 1 year ago

Since trashing a document on the remote Cozy changes its CouchDB revision, we need to store this updated metadata in our local PouchDB. This makes future changes on the remote doc and detecting that the trashed remote document is up-to-date possible.

We were updating the remote revision only when the doc had previously been moved and that move wasn't synchronized yet. We're now saving the complete updated remote metadata whenever merging a document trashing (this includes the trashed attribute).

Please make sure the following boxes are checked: