mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-30 10:59:02 +01:00
Fix: immortal cache of sponsored messages
This commit is contained in:
parent
7fdc43f08f
commit
a05e11c1ff
@ -41,7 +41,7 @@ trait Ads
|
||||
{
|
||||
$peer = (yield from $this->getInfo($peer))['bot_api_id'];
|
||||
$cache = yield $this->sponsoredMessages[$peer];
|
||||
if ($cache && $cache[0] < \time()) {
|
||||
if ($cache && $cache[0] > \time()) {
|
||||
return $cache[1];
|
||||
}
|
||||
$result = (yield from $this->methodCallAsyncRead('channels.getSponsoredMessages', ['channel' => $peer]))['messages'];
|
||||
|
Loading…
Reference in New Issue
Block a user