that’s it.
Your sync function could look something like
function(doc){
var channelName = doc.clientId;
channel(channelName); // assign the document to the channel
access(doc.clientId, channelName); //grant the user access to the channel
}
that’s it.
Your sync function could look something like
function(doc){
var channelName = doc.clientId;
channel(channelName); // assign the document to the channel
access(doc.clientId, channelName); //grant the user access to the channel
}