Use email address for huddle display recipients.

This fixes replying to huddle messages.

(imported from commit 8e6f9ce7d690c926b19c50016ec972d767428994)
This commit is contained in:
Tim Abbott 2012-09-26 13:19:25 -04:00
parent f929593263
commit d374312509
2 changed files with 3 additions and 3 deletions

View File

@ -24,7 +24,7 @@ def get_display_recipient(recipient):
elif recipient.type == Recipient.HUDDLE: elif recipient.type == Recipient.HUDDLE:
user_list = [UserProfile.objects.get(user=s.userprofile) for s in user_list = [UserProfile.objects.get(user=s.userprofile) for s in
Subscription.objects.filter(recipient=recipient)] 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: else:
user = User.objects.get(id=recipient.type_id) user = User.objects.get(id=recipient.type_id)
return user.email return user.email

View File

@ -348,9 +348,9 @@ function scroll_to_selected() {
function get_huddle_recipient(zephyr) { function get_huddle_recipient(zephyr) {
var recipient, i; var recipient, i;
recipient = zephyr.display_recipient[0].name; recipient = zephyr.display_recipient[0].email;
for (i = 1; i < zephyr.display_recipient.length; i++) { for (i = 1; i < zephyr.display_recipient.length; i++) {
recipient += ', ' + zephyr.display_recipient[i].name; recipient += ', ' + zephyr.display_recipient[i].email;
} }
return recipient; return recipient;
} }