From cb56c54351d1108199eaa87606dd789449a38955 Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Thu, 2 May 2019 18:51:10 +0200 Subject: [PATCH] Use the entity cache in sender getter --- telethon/tl/custom/sendergetter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/telethon/tl/custom/sendergetter.py b/telethon/tl/custom/sendergetter.py index e707d751..9c9724fc 100644 --- a/telethon/tl/custom/sendergetter.py +++ b/telethon/tl/custom/sendergetter.py @@ -53,8 +53,8 @@ class SenderGetter(abc.ABC): """ if self._input_sender is None and self._sender_id and self._client: try: - self._input_sender = self._client.session\ - .get_input_entity(self._sender_id) + self._input_sender = \ + self._client._entity_cache[self._sender_id] except ValueError: pass return self._input_sender