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:
evykassirer
2023-07-26 13:07:21 -07:00
committed by Tim Abbott
parent 45af8a9406
commit 846b470b99
31 changed files with 154 additions and 108 deletions

View File

@@ -134,7 +134,7 @@ export function create_message_object() {
content: compose_state.message_content(),
sender_id: page_params.user_id,
queue_id: page_params.queue_id,
stream: "",
stream_id: "",
};
message.topic = "";
@@ -159,8 +159,6 @@ export function create_message_object() {
const stream_id = compose_state.stream_id();
message.stream_id = stream_id;
message.to = stream_id;
const stream = stream_data.get_sub_by_id(stream_id);
message.stream = stream ? stream.name : "";
}
return message;
}