mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-16 20:59:29 +00:00
Do not cache entities without access_hash
This commit is contained in:
parent
8cc61f00ed
commit
85700b0ffc
@ -762,6 +762,8 @@ class Client(Methods, BaseClient):
|
|||||||
types.Chat, types.ChatForbidden,
|
types.Chat, types.ChatForbidden,
|
||||||
types.Channel, types.ChannelForbidden]]):
|
types.Channel, types.ChannelForbidden]]):
|
||||||
for entity in entities:
|
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)
|
self.session_storage.cache_peer(entity)
|
||||||
|
|
||||||
def download_worker(self):
|
def download_worker(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user