mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-28 12:57:52 +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.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…
x
Reference in New Issue
Block a user