From d3743125096a6e7e86aa819a050400d63115ffba Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Wed, 26 Sep 2012 13:19:25 -0400 Subject: [PATCH] Use email address for huddle display recipients. This fixes replying to huddle messages. (imported from commit 8e6f9ce7d690c926b19c50016ec972d767428994) --- zephyr/models.py | 2 +- zephyr/static/js/zephyr.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/zephyr/models.py b/zephyr/models.py index 269c8f7ed7..7189e273d2 100644 --- a/zephyr/models.py +++ b/zephyr/models.py @@ -24,7 +24,7 @@ def get_display_recipient(recipient): elif recipient.type == Recipient.HUDDLE: user_list = [UserProfile.objects.get(user=s.userprofile) for s in Subscription.objects.filter(recipient=recipient)] - return [{'name': user.short_name} for user in user_list] + return [{'email': user.email} for user in user_list] else: user = User.objects.get(id=recipient.type_id) return user.email diff --git a/zephyr/static/js/zephyr.js b/zephyr/static/js/zephyr.js index 3b81526612..ea850af36c 100644 --- a/zephyr/static/js/zephyr.js +++ b/zephyr/static/js/zephyr.js @@ -348,9 +348,9 @@ function scroll_to_selected() { function get_huddle_recipient(zephyr) { var recipient, i; - recipient = zephyr.display_recipient[0].name; + recipient = zephyr.display_recipient[0].email; for (i = 1; i < zephyr.display_recipient.length; i++) { - recipient += ', ' + zephyr.display_recipient[i].name; + recipient += ', ' + zephyr.display_recipient[i].email; } return recipient; }