summaryrefslogtreecommitdiff
path: root/users/app/designs
diff options
context:
space:
mode:
authorjessib <jessib@riseup.net>2014-02-10 11:00:28 -0800
committerjessib <jessib@riseup.net>2014-02-10 11:00:28 -0800
commita2289579eea138e0b7318f8866a0ed33f269761c (patch)
treea5fb064123600d53a1b8e93953818316f0d0a968 /users/app/designs
parentb6ef51277b4e6d65cfda15f0124ae4f222f7f241 (diff)
parente3577906891f9ab0edd987544e3432f354bc1721 (diff)
Merge pull request #139 from azul/refactor/tweaks-to-messages
Refactor/tweaks to messages
Diffstat (limited to 'users/app/designs')
-rw-r--r--users/app/designs/message/by_user_ids_to_show.js6
-rw-r--r--users/app/designs/message/by_user_ids_to_show_and_created_at.js6
2 files changed, 6 insertions, 6 deletions
diff --git a/users/app/designs/message/by_user_ids_to_show.js b/users/app/designs/message/by_user_ids_to_show.js
index 95ccd0d..e33566b 100644
--- a/users/app/designs/message/by_user_ids_to_show.js
+++ b/users/app/designs/message/by_user_ids_to_show.js
@@ -1,7 +1,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 (userIdsToShow) {
- emit(userIdsToShow, 1);
+ doc.user_ids_to_show.forEach(function (userId) {
+ emit(userId, 1);
});
}
-} \ No newline at end of file
+}
diff --git a/users/app/designs/message/by_user_ids_to_show_and_created_at.js b/users/app/designs/message/by_user_ids_to_show_and_created_at.js
index 18969b8..54e4604 100644
--- a/users/app/designs/message/by_user_ids_to_show_and_created_at.js
+++ b/users/app/designs/message/by_user_ids_to_show_and_created_at.js
@@ -2,8 +2,8 @@
// call with something like Message.by_user_ids_to_show_and_created_at.startkey([user_id, start_date]).endkey([user_id,end_date])
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 (userIdsToShow) {
- emit([userIdsToShow, doc.created_at], 1);
+ doc.user_ids_to_show.forEach(function (userId) {
+ emit([userId, doc.created_at], 1);
});
}
-} \ No newline at end of file
+}