From bfff131c289fb6509b9100d5705fce82e1ab50d6 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Thu, 27 Dec 2018 23:26:40 +0100 Subject: [PATCH] Add additional caching for empty access hashes --- src/danog/MadelineProto/MTProtoTools/PeerHandler.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/danog/MadelineProto/MTProtoTools/PeerHandler.php b/src/danog/MadelineProto/MTProtoTools/PeerHandler.php index 06cd6c26..b464b81b 100644 --- a/src/danog/MadelineProto/MTProtoTools/PeerHandler.php +++ b/src/danog/MadelineProto/MTProtoTools/PeerHandler.php @@ -83,6 +83,7 @@ trait PeerHandler public function add_user($user) { if (!isset($user['access_hash'])) { + $this->cache_pwr_chat($user['id'], false, true); if (isset($user['username']) && !isset($this->chats[$user['id']])) { $this->cache_pwr_chat($user['username'], false, true); } @@ -127,6 +128,7 @@ trait PeerHandler case 'channelForbidden': $bot_api_id = $this->to_supergroup($chat['id']); if (!isset($chat['access_hash'])) { + $this->cache_pwr_chat($bot_api_id, $this->settings['peer']['full_fetch'], true); if (isset($chat['username']) && !isset($this->chats[$bot_api_id])) { $this->cache_pwr_chat($chat['username'], $this->settings['peer']['full_fetch'], true); }