mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 07:23:22 +00:00
compose: Correctly restore general-topic drafts.
This commit is contained in:
@@ -16,6 +16,7 @@ import * as messages_overlay_ui from "./messages_overlay_ui.ts";
|
|||||||
import * as overlays from "./overlays.ts";
|
import * as overlays from "./overlays.ts";
|
||||||
import * as people from "./people.ts";
|
import * as people from "./people.ts";
|
||||||
import * as rendered_markdown from "./rendered_markdown.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_card_popover from "./user_card_popover.ts";
|
||||||
import * as user_group_popover from "./user_group_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};
|
const compose_args = {...drafts.restore_message(draft), draft_id};
|
||||||
|
|
||||||
if (compose_args.type === "stream") {
|
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(
|
message_view.show(
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user