summaryrefslogtreecommitdiff
path: root/app/designs/message/by_user_ids_to_show.js
blob: e33566b9208aa98570292fd6712d9c580d63922f (plain)
1
2
3
4
5
6
7
function (doc) {
  if (doc.type === 'Message' && doc.user_ids_to_show && Array.isArray(doc.user_ids_to_show)) {
    doc.user_ids_to_show.forEach(function (userId) {
      emit(userId, 1);
    });
  }
}