mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
messages: Use stream_id instead of stream name.
This should cause no functional changes. This is part of a multi-step effort to move away from using stream names to reference streams, now that it's impossible for a user to write a message with an invalid stream name (since switching to the dropdown).
This commit is contained in:
@@ -418,7 +418,7 @@ export class MessageListView {
|
||||
message_container.sender_is_guest = people.sender_is_guest(message_container.msg);
|
||||
|
||||
message_container.small_avatar_url = people.small_avatar_url(message_container.msg);
|
||||
if (message_container.msg.stream) {
|
||||
if (message_container.msg.stream_id) {
|
||||
message_container.background_color = stream_data.get_color(
|
||||
message_container.msg.stream_id,
|
||||
);
|
||||
@@ -447,19 +447,20 @@ export class MessageListView {
|
||||
|
||||
const last_subscribed = !last_msg_container.msg.historical;
|
||||
const first_subscribed = !first_msg_container.msg.historical;
|
||||
const stream = first_msg_container.msg.stream;
|
||||
const stream_id = first_msg_container.msg.stream_id;
|
||||
const stream_name = stream_data.get_stream_name_from_id(stream_id);
|
||||
|
||||
if (!last_subscribed && first_subscribed) {
|
||||
group.bookend_top = true;
|
||||
group.subscribed = true;
|
||||
group.stream_name = stream;
|
||||
group.stream_name = stream_name;
|
||||
return;
|
||||
}
|
||||
|
||||
if (last_subscribed && !first_subscribed) {
|
||||
group.bookend_top = true;
|
||||
group.just_unsubscribed = true;
|
||||
group.stream_name = stream;
|
||||
group.stream_name = stream_name;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -517,7 +518,7 @@ export class MessageListView {
|
||||
|
||||
this.maybe_add_subscription_marker(current_group, prev, message_container);
|
||||
|
||||
if (message_container.msg.stream) {
|
||||
if (message_container.msg.stream_id) {
|
||||
message_container.stream_url = hash_util.by_stream_url(
|
||||
message_container.msg.stream_id,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user