Cache sponsored messages for 5 minutes.

This commit is contained in:
John Preston 2021-11-05 15:28:45 +04:00
parent d0cb387c6e
commit c0f898b069

View file

@ -19,7 +19,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
namespace Data {
namespace {
constexpr auto kRequestTimeLimit = 10 * 60 * crl::time(1000);
constexpr auto kRequestTimeLimit = 5 * 60 * crl::time(1000);
[[nodiscard]] bool TooEarlyForRequest(crl::time received) {
return (received > 0) && (received + kRequestTimeLimit > crl::now());