refactor: Pass only stream id, not name, to compose_actions.start().

As part of the process of moving from stream names to ids, we now only
pass the stream id in compose args to `compose_actions.start()`.

For when we still need the stream name, and have access to the compose
args, we compute it from the id exactly where needed, to localise the
instances of stream names.
This commit is contained in:
N-Shar-ma
2024-01-07 03:47:15 +05:30
committed by Tim Abbott
parent d8044a1b07
commit f99635d582
3 changed files with 8 additions and 5 deletions

View File

@@ -29,7 +29,10 @@ function restore_draft(draft_id) {
if (draft.stream_id !== undefined && draft.topic !== "") {
narrow.activate(
[
{operator: "stream", operand: compose_args.stream_name},
{
operator: "stream",
operand: stream_data.get_stream_name_from_id(compose_args.stream_id),
},
{operator: "topic", operand: compose_args.topic},
],
{trigger: "restore draft"},