From dd3c8430bfe1cef3149b305b237441e536821a3e Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 1 Nov 2022 11:28:57 +0400 Subject: [PATCH] Forbid deleting the topic root. --- Telegram/SourceFiles/history/history_item.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Telegram/SourceFiles/history/history_item.cpp b/Telegram/SourceFiles/history/history_item.cpp index 3bc21ef7ea..ecc1343447 100644 --- a/Telegram/SourceFiles/history/history_item.cpp +++ b/Telegram/SourceFiles/history/history_item.cpp @@ -838,6 +838,8 @@ bool HistoryItem::canDelete() const { return false; } else if (isService() && !isRegular()) { return false; + } else if (topicRootId() == id) { + return false; } else if (!isHistoryEntry() && !isScheduled()) { return false; }