mirror of
https://github.com/zulip/zulip.git
synced 2025-11-12 18:06:44 +00:00
people: Remove line for type of message that can't exist.
This will help us with a code coverage issue in an upcoming commit.
This commit is contained in:
@@ -1533,10 +1533,9 @@ export function get_user_by_id_assert_valid(
|
|||||||
}
|
}
|
||||||
|
|
||||||
function get_involved_people(message: MessageWithBooleans): DisplayRecipientUser[] {
|
function get_involved_people(message: MessageWithBooleans): DisplayRecipientUser[] {
|
||||||
let involved_people: DisplayRecipientUser[];
|
let involved_people: DisplayRecipientUser[] = [];
|
||||||
|
|
||||||
switch (message.type) {
|
if (message.type === "stream") {
|
||||||
case "stream":
|
|
||||||
involved_people = [
|
involved_people = [
|
||||||
{
|
{
|
||||||
full_name: message.sender_full_name,
|
full_name: message.sender_full_name,
|
||||||
@@ -1545,18 +1544,12 @@ function get_involved_people(message: MessageWithBooleans): DisplayRecipientUser
|
|||||||
is_mirror_dummy: false,
|
is_mirror_dummy: false,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
break;
|
} else if (message.type === "private") {
|
||||||
|
|
||||||
case "private":
|
|
||||||
assert(
|
assert(
|
||||||
typeof message.display_recipient !== "string",
|
typeof message.display_recipient !== "string",
|
||||||
"Private messages should have list of recipients",
|
"Private messages should have list of recipients",
|
||||||
);
|
);
|
||||||
involved_people = message.display_recipient;
|
involved_people = message.display_recipient;
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
involved_people = [];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return involved_people;
|
return involved_people;
|
||||||
|
|||||||
Reference in New Issue
Block a user