mirror of
https://github.com/zulip/zulip.git
synced 2025-11-11 17:36:27 +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[] {
|
||||
let involved_people: DisplayRecipientUser[];
|
||||
let involved_people: DisplayRecipientUser[] = [];
|
||||
|
||||
switch (message.type) {
|
||||
case "stream":
|
||||
if (message.type === "stream") {
|
||||
involved_people = [
|
||||
{
|
||||
full_name: message.sender_full_name,
|
||||
@@ -1545,18 +1544,12 @@ function get_involved_people(message: MessageWithBooleans): DisplayRecipientUser
|
||||
is_mirror_dummy: false,
|
||||
},
|
||||
];
|
||||
break;
|
||||
|
||||
case "private":
|
||||
} else if (message.type === "private") {
|
||||
assert(
|
||||
typeof message.display_recipient !== "string",
|
||||
"Private messages should have list of recipients",
|
||||
);
|
||||
involved_people = message.display_recipient;
|
||||
break;
|
||||
|
||||
default:
|
||||
involved_people = [];
|
||||
}
|
||||
|
||||
return involved_people;
|
||||
|
||||
Reference in New Issue
Block a user