mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
pm_list: Use "Muted user" placeholder for muted usernames.
This also handles a few other places missed earlier like narrow headings, beacuse they use the same function. We already rerender the PM list for events, so there's no need to do anything special when someone is muted/unmuted. `people.get_full_names` is now only used in the settings pages while creating ListWidgets etc, so we add a new test for it to ensure coverage.
This commit is contained in:
committed by
Tim Abbott
parent
49e076e01c
commit
a377a2df8b
@@ -397,8 +397,18 @@ test_people("pm_lookup_key", () => {
|
||||
|
||||
test_people("get_recipients", () => {
|
||||
people.add_active_user(isaac);
|
||||
people.add_active_user(linus);
|
||||
assert.equal(people.get_recipients("30"), "Me Myself");
|
||||
assert.equal(people.get_recipients("30,32"), "Isaac Newton");
|
||||
|
||||
muting.add_muted_user(304);
|
||||
assert.equal(people.get_recipients("304,32"), "Isaac Newton, translated: Muted user");
|
||||
});
|
||||
|
||||
test_people("get_full_name", () => {
|
||||
people.add_active_user(isaac);
|
||||
const names = people.get_full_name(isaac.user_id);
|
||||
assert.equal(names, "Isaac Newton");
|
||||
});
|
||||
|
||||
test_people("get_full_names_for_poll_option", () => {
|
||||
|
||||
@@ -333,7 +333,7 @@ export function get_recipients(user_ids_string) {
|
||||
return my_full_name();
|
||||
}
|
||||
|
||||
const names = other_ids.map((user_id) => get_full_name(user_id)).sort();
|
||||
const names = get_display_full_names(other_ids).sort();
|
||||
return names.join(", ");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user