mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-30 14:17:45 +00:00
Cache sponsored messages for 5 minutes.
This commit is contained in:
@@ -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());
|
||||||
|
Reference in New Issue
Block a user