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

@@ -32,6 +32,7 @@ import {page_params} from "./page_params";
import * as resize from "./resize";
import * as rows from "./rows";
import * as settings_data from "./settings_data";
import * as stream_data from "./stream_data";
import * as timerender from "./timerender";
import {show_copied_confirmation} from "./tippyjs";
import * as ui_report from "./ui_report";
@@ -727,9 +728,10 @@ export function start_inline_topic_edit($recipient_row) {
}
const $inline_topic_edit_input = $form.find(".inline_topic_edit");
$inline_topic_edit_input.val(topic).trigger("select").trigger("focus");
const stream_name = stream_data.get_stream_name_from_id(message.stream_id);
composebox_typeahead.initialize_topic_edit_typeahead(
$inline_topic_edit_input,
message.stream,
stream_name,
false,
);
}