blob: 33dfe0bfca6404481e9e999c862c8297ddcbf1f4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
function(doc) {
var arr = {}
if (doc['type'] == 'Ticket' && doc.comments) {
doc.comments.forEach(function(comment){
if (comment.posted_by && !arr[comment.posted_by]) {
//don't add duplicates
arr[comment.posted_by] = true;
emit([comment.posted_by, doc.is_open, doc.created_at], 1);
}
});
}
}
|