blob: 72169b08e15b549c58158cd79b28acc76b38c571 (
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.created_at], 1);
}
});
}
}
|