From 321490e528b7fa99e059a2c512ab29c102171e64 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Fri, 24 Jan 2025 22:22:04 +0300 Subject: [PATCH] Fixed ability to moderate messages from channel authors. --- Telegram/SourceFiles/boxes/moderate_messages_box.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Telegram/SourceFiles/boxes/moderate_messages_box.cpp b/Telegram/SourceFiles/boxes/moderate_messages_box.cpp index 49df5b0ea..8007b9383 100644 --- a/Telegram/SourceFiles/boxes/moderate_messages_box.cpp +++ b/Telegram/SourceFiles/boxes/moderate_messages_box.cpp @@ -72,6 +72,16 @@ ModerateOptions CalculateModerateOptions(const HistoryItemsList &items) { if (peer != item->history()->peer) { return {}; } + { + const auto author = item->author(); + if (author == peer) { + return {}; + } else if (const auto channel = author->asChannel()) { + if (channel->linkedChat() == peer) { + return {}; + } + } + } if (!item->suggestBanReport()) { result.allCanBan = false; }