message_list_view: Don't assume stream_id is defined.

This commit is contained in:
Tim Abbott 2024-07-25 07:49:38 -07:00
parent 966fe68591
commit a1c8e3549a
1 changed files with 2 additions and 1 deletions

View File

@ -289,10 +289,11 @@ function populate_group_from_message_container(group, message_container) {
// module. Ideally, we'd clean this up by making the
// tutorial populate stream_settings_ui.js "properly".
group.stream_id = -1;
group.stream_name = $t({defaultMessage: "Unknown channel"});
} else {
group.stream_id = sub.stream_id;
group.stream_name = stream_data.get_stream_name_from_id(sub.stream_id);
}
group.stream_name = stream_data.get_stream_name_from_id(sub.stream_id);
group.is_subscribed = stream_data.is_subscribed(group.stream_id);
group.topic_is_resolved = resolved_topic.is_resolved(group.topic);
group.visibility_policy = user_topics.get_topic_visibility_policy(