mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-09 13:29:47 +00:00
Use the new in-memory entity cache
This should avoid a disk access every time an input entity is needed, which is very often. Another step for #1141.
This commit is contained in:
@@ -362,10 +362,8 @@ class ChatAction(EventBuilder):
|
||||
self._input_users = []
|
||||
for peer in self._user_peers:
|
||||
try:
|
||||
self._input_users.append(
|
||||
self._client.session.get_input_entity(peer)
|
||||
)
|
||||
except ValueError:
|
||||
self._input_users.append(self._client._entity_cache[peer])
|
||||
except KeyError:
|
||||
pass
|
||||
return self._input_users or []
|
||||
|
||||
|
Reference in New Issue
Block a user