diff --git i/Telegram/SourceFiles/data/components/sponsored_messages.cpp w/Telegram/SourceFiles/data/components/sponsored_messages.cpp index 5ae9d8b2c..f116246b5 100644 --- i/Telegram/SourceFiles/data/components/sponsored_messages.cpp +++ w/Telegram/SourceFiles/data/components/sponsored_messages.cpp @@ -27,7 +27,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL namespace Data { namespace { -constexpr auto kRequestTimeLimit = 5 * 60 * crl::time(1000); +constexpr auto kRequestTimeLimit = 9999999 * 60 * crl::time(1000); [[nodiscard]] bool TooEarlyForRequest(crl::time received) { return (received > 0) && (received + kRequestTimeLimit > crl::now()); @@ -74,6 +74,9 @@ void SponsoredMessages::clearOldRequests() { SponsoredMessages::AppendResult SponsoredMessages::append( not_null history) { + if (1) { + return; + } if (isTopBarFor(history)) { return SponsoredMessages::AppendResult::None; } @@ -110,6 +113,9 @@ void SponsoredMessages::inject( MsgId injectAfterMsgId, int betweenHeight, int fallbackWidth) { + if (1) { + return; + } if (!canHaveFor(history)) { return; } @@ -210,24 +216,17 @@ void SponsoredMessages::inject( } bool SponsoredMessages::canHaveFor(not_null history) const { - if (history->peer->isChannel()) { - return true; - } else if (const auto user = history->peer->asUser()) { - return user->isBot(); - } return false; } bool SponsoredMessages::isTopBarFor(not_null history) const { - if (peerIsUser(history->peer->id)) { - if (const auto user = history->peer->asUser()) { - return user->isBot(); - } - } return false; } void SponsoredMessages::request(not_null history, Fn done) { + if (1) { + return; + } if (!canHaveFor(history)) { return; }