mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 20:14:51 +00:00
Do not cache entities without access_hash
This commit is contained in:
parent
8cc61f00ed
commit
85700b0ffc
1 changed files with 2 additions and 0 deletions
|
|
@ -762,6 +762,8 @@ class Client(Methods, BaseClient):
|
|||
types.Chat, types.ChatForbidden,
|
||||
types.Channel, types.ChannelForbidden]]):
|
||||
for entity in entities:
|
||||
if isinstance(entity, (types.User, types.Channel, types.ChannelForbidden)) and not entity.access_hash:
|
||||
continue
|
||||
self.session_storage.cache_peer(entity)
|
||||
|
||||
def download_worker(self):
|
||||
|
|
|
|||
Loading…
Reference in a new issue