mirror of https://github.com/zulip/zulip.git
Use email address for huddle display recipients.
This fixes replying to huddle messages. (imported from commit 8e6f9ce7d690c926b19c50016ec972d767428994)
This commit is contained in:
parent
f929593263
commit
d374312509
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue