When I edit a document (it is into the “CH_PROJECTS” channel) from the mobile the change is updated correctly to all the users that have been synchronized before the change.
But if I create a new user and start the sync to the server throught sync_gateway, all the documents from the CH_PRORJECT channel are downloaded and synchronized to this new user except the edited documents that are not synchronized to this user.
(The users from all this clients are the same, called “Admin”).
Here is my sync_function:
if (doc.type == "proj" ) {
if(oldDoc==null || doc._deleted){
requireUser("Admin");
}
requireUser(["Manager","Admin"]);
channel("CH_PROJECT");
}
Any idea why I have this error?