mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-22 17:36:34 +03:00
Use the entity cache in sender getter
This commit is contained in:
parent
1a00de6494
commit
cb56c54351
|
@ -53,8 +53,8 @@ class SenderGetter(abc.ABC):
|
||||||
"""
|
"""
|
||||||
if self._input_sender is None and self._sender_id and self._client:
|
if self._input_sender is None and self._sender_id and self._client:
|
||||||
try:
|
try:
|
||||||
self._input_sender = self._client.session\
|
self._input_sender = \
|
||||||
.get_input_entity(self._sender_id)
|
self._client._entity_cache[self._sender_id]
|
||||||
except ValueError:
|
except ValueError:
|
||||||
pass
|
pass
|
||||||
return self._input_sender
|
return self._input_sender
|
||||||
|
|
Loading…
Reference in New Issue
Block a user