people: Deduplicate get_full_names logic.

Share code between `safe_full_names` and `get_display_full_names`
functions, and rename `safe_full_names` to `get_full_names_for_poll`,
because that was the only place where this was used earlier.

This also has the nice side effect of showing "Muted user" instead
of the muted username in poll results.
This commit is contained in:
Abhijeet Prasad Bodas
2021-05-11 20:03:52 +05:30
committed by Tim Abbott
parent c637994612
commit 421cf05176
4 changed files with 6 additions and 13 deletions

View File

@@ -19,7 +19,7 @@ export function activate({
is_my_poll,
question,
options,
comma_separated_names: people.safe_full_names,
comma_separated_names: people.get_full_names_for_poll_option,
report_error_function: blueslip.warn,
});