Fix possible crash in stories.

This commit is contained in:
John Preston 2025-02-05 14:29:58 +04:00
parent 8596b0309e
commit 1bf50d60d8

View file

@ -312,7 +312,7 @@ void Stories::scheduleExpireTimer() {
const auto nearest = _expiring.front().first;
const auto now = base::unixtime::now();
const auto delay = (nearest > now)
? (nearest - now)
? std::min(nearest - now, 86'400)
: 0;
_expireTimer.callOnce(delay * crl::time(1000));
}