Hi,all
    I am using sync gateway 1.0.4, my sync function like this :


function(doc,oldDoc){
  if (doc.type == "MESSAGE") {
    if(doc.key_id){
      var key_id = doc.key_id;
      channel('k-'+key_id);
    }
  }
}


and my doc like 
this:{"id":"MSG001","type":"MESSAGE","key_id":"key001","body":"test1"}

when I created this document by sync gateway ret api,I got sync gateway log 
like this:


02:32:08.140931 CRUD:   Doc "MSG001" in channels "{k-undefined}"


In fact I want to set Doc "MSG001" in channles "{k-key001}",not 
"{k-undefined}". can any one help me to fix this issue?

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/ff128d3d-2379-4085-9563-a31b9504691f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to