Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

scheduled_message: Fix editing msg scheduled to inaccessible stream.

Sahil Batra263940817151
diff --git a/web/src/scheduled_messages_feed_ui.js b/web/src/scheduled_messages_feed_ui.js
index 2581340f67d..36d85a9ed64 100644
--- a/web/src/scheduled_messages_feed_ui.js
+++ b/web/src/scheduled_messages_feed_ui.js
@@ -33,6 +33,9 @@ function get_scheduled_messages_matching_narrow() {
return true;
}
} else if (scheduled_message.type === "stream") {
+ if (narrow_state.stream_sub() === undefined) {
+ return false;
+ }
const narrow_dict = {
stream_id: narrow_state.stream_sub().stream_id,
topic: narrow_state.topic(),
diff --git a/web/src/scheduled_messages_ui.js b/web/src/scheduled_messages_ui.js
index 202bd80ce74..00b2ec5b980 100644
--- a/web/src/scheduled_messages_ui.js
+++ b/web/src/scheduled_messages_ui.js
@@ -8,7 +8,7 @@ import {$t} from "./i18n";
import * as narrow from "./narrow";
import * as people from "./people";
import * as scheduled_messages from "./scheduled_messages";
-import * as sub_store from "./sub_store";
+import * as stream_data from "./stream_data";
import * as timerender from "./timerender";
export function hide_scheduled_message_success_compose_banner(scheduled_message_id) {
@@ -39,7 +39,7 @@ export function open_scheduled_message_in_compose(scheduled_msg, should_narrow_t
compose_args = {
type: "stream",
stream_id: scheduled_msg.to,
- stream: sub_store.maybe_get_stream_name(scheduled_msg.to),
+ stream: stream_data.get_stream_name_from_id(scheduled_msg.to),
topic: scheduled_msg.topic,
content: scheduled_msg.content,
};