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.

compose: Correctly restore general-topic drafts.

Karl Stolleydfb03251b08e
diff --git a/web/src/drafts_overlay_ui.ts b/web/src/drafts_overlay_ui.ts
index 0997f0df6ee..f46450f9ae5 100644
--- a/web/src/drafts_overlay_ui.ts
+++ b/web/src/drafts_overlay_ui.ts
@@ -16,6 +16,7 @@ import * as messages_overlay_ui from "./messages_overlay_ui.ts";
import * as overlays from "./overlays.ts";
import * as people from "./people.ts";
import * as rendered_markdown from "./rendered_markdown.ts";
+import {realm} from "./state_data.ts";
import * as user_card_popover from "./user_card_popover.ts";
import * as user_group_popover from "./user_group_popover.ts";
@@ -28,7 +29,10 @@ function restore_draft(draft_id: string): void {
const compose_args = {...drafts.restore_message(draft), draft_id};
if (compose_args.type === "stream") {
- if (compose_args.stream_id !== undefined && compose_args.topic !== "") {
+ if (
+ compose_args.stream_id !== undefined &&
+ (compose_args.topic !== "" || !realm.realm_mandatory_topics)
+ ) {
message_view.show(
[
{