compose: Use compose_state.stream_id when name isn't needed.

This partially fixes #25742.
This commit is contained in:
evykassirer
2023-05-25 17:48:11 -07:00
committed by Tim Abbott
parent afd703fe77
commit 7116526492
5 changed files with 30 additions and 24 deletions

View File

@@ -517,11 +517,11 @@ export function initialize() {
(event) => {
event.preventDefault();
const stream_name = compose_state.stream_name();
if (stream_name === "") {
const stream_id = compose_state.stream_id();
if (stream_id === "") {
return;
}
const sub = stream_data.get_sub(stream_name);
const sub = stream_data.get_sub_by_id(stream_id);
stream_settings_ui.sub_or_unsub(sub);
$(user_not_subscribed_selector).remove();
},