How does delete syncing work for manual syncs?

I have been going through the source code and have a question about how deleting folders (or ciphers, or anything else) works.

First of all, I can see that a notification is sent when a delete occurs, and this eventually received by all clients and results in the delete. But some clients cannot receive notifications and must do manual syncing (for example, the cli and f-droid clients).

In this case, it seems a manual sync happens through a call to the “fullSync” method (in jslib/src/services/sync.service.ts). When I look at this method, I see that it calls a bunch of methods (like “syncFolders” for folders, “syncCiphers” for passwords, etc). These methods replace the old entry with the one from the server. However, I don’t understand how the client would become aware that something was deleted.

What am I missing?

Nevermind. I think I got it. A full sync does not actually sync the delta, but rather just downloads and replaces the entire database. At least that’s my understanding after re-reading the code.

1 Like