diff --git a/Telegram/SourceFiles/data/data_media_types.cpp b/Telegram/SourceFiles/data/data_media_types.cpp index 8065cfaf9..3fe8dcfef 100644 --- a/Telegram/SourceFiles/data/data_media_types.cpp +++ b/Telegram/SourceFiles/data/data_media_types.cpp @@ -975,10 +975,6 @@ bool MediaCall::allowsForward() const { return false; } -bool MediaCall::allowsRevoke() const { - return false; -} - bool MediaCall::updateInlineResultMedia(const MTPMessageMedia &media) { return false; } diff --git a/Telegram/SourceFiles/data/data_media_types.h b/Telegram/SourceFiles/data/data_media_types.h index 8c92b2afa..21341fd6a 100644 --- a/Telegram/SourceFiles/data/data_media_types.h +++ b/Telegram/SourceFiles/data/data_media_types.h @@ -267,7 +267,6 @@ public: QString pinnedTextSubstring() const override; TextForMimeData clipboardText() const override; bool allowsForward() const override; - bool allowsRevoke() const override; bool updateInlineResultMedia(const MTPMessageMedia &media) override; bool updateSentMedia(const MTPMessageMedia &media) override; diff --git a/Telegram/SourceFiles/history/history_item.cpp b/Telegram/SourceFiles/history/history_item.cpp index 53ceb79c6..33aa11807 100644 --- a/Telegram/SourceFiles/history/history_item.cpp +++ b/Telegram/SourceFiles/history/history_item.cpp @@ -494,11 +494,13 @@ bool HistoryItem::canDeleteForEveryone(TimeId now) const { return false; } } - if (!toHistoryMessage()) { - return false; - } else if (const auto media = this->media()) { - if (!media->allowsRevoke()) { + if (!peer->isUser()) { + if (!toHistoryMessage()) { return false; + } else if (const auto media = this->media()) { + if (!media->allowsRevoke()) { + return false; + } } } if (!out()) {