mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 14:35:27 +00:00
people: Extract emails_to_full_names_string helper.
This code that previously lived in a larger function is needed by another function in PR #22127.
This commit is contained in:
@@ -324,16 +324,7 @@ export function format_draft(draft) {
|
||||
};
|
||||
} else {
|
||||
const emails = util.extract_pm_recipients(draft.private_message_recipient);
|
||||
const recipients = emails
|
||||
.map((email) => {
|
||||
email = email.trim();
|
||||
const person = people.get_by_email(email);
|
||||
if (person !== undefined) {
|
||||
return person.full_name;
|
||||
}
|
||||
return email;
|
||||
})
|
||||
.join(", ");
|
||||
const recipients = people.emails_to_full_names_string(emails);
|
||||
|
||||
formatted = {
|
||||
draft_id: draft.id,
|
||||
|
||||
Reference in New Issue
Block a user