From 3df3936ed2bbd32c2ee9dc25e9c7cc20fd1ec293 Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 8 Jul 2026 21:11:41 +0400 Subject: [PATCH] Discard empty rich-page drafts on save. --- Telegram/SourceFiles/iv/editor/iv_editor_session.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Telegram/SourceFiles/iv/editor/iv_editor_session.cpp b/Telegram/SourceFiles/iv/editor/iv_editor_session.cpp index d6c93a034b..cf26fa26ce 100644 --- a/Telegram/SourceFiles/iv/editor/iv_editor_session.cpp +++ b/Telegram/SourceFiles/iv/editor/iv_editor_session.cpp @@ -3664,6 +3664,11 @@ std::optional<::Data::Draft> ArticleSession::prepareRichDraftForAutosave() const draft.webpage = ::Data::WebPageDraft(); draft.reply.topicRootId = topicRootId; draft.reply.monoforumPeerId = monoforumPeerId; + if (_state->articleEmpty()) { + draft.richMessage = nullptr; + draft.richMessageSummary = {}; + return draft; + } if (auto simple = SerializeAsSimple(_state->richPage(), _session)) { draft.textWithTags = { simple->text,