mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Cache sponsored messages for 5 minutes.
This commit is contained in:
parent
d0cb387c6e
commit
c0f898b069
1 changed files with 1 additions and 1 deletions
|
@ -19,7 +19,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
namespace Data {
|
namespace Data {
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
constexpr auto kRequestTimeLimit = 10 * 60 * crl::time(1000);
|
constexpr auto kRequestTimeLimit = 5 * 60 * crl::time(1000);
|
||||||
|
|
||||||
[[nodiscard]] bool TooEarlyForRequest(crl::time received) {
|
[[nodiscard]] bool TooEarlyForRequest(crl::time received) {
|
||||||
return (received > 0) && (received + kRequestTimeLimit > crl::now());
|
return (received > 0) && (received + kRequestTimeLimit > crl::now());
|
||||||
|
|
Loading…
Add table
Reference in a new issue