Remove redundant entity cache

Progress towards #3989.
May also help with #3235.
This commit is contained in:
Lonami Exo
2023-04-06 13:09:07 +02:00
parent 3e64ea35ff
commit f7e38ee6f0
14 changed files with 35 additions and 32 deletions

View File

@@ -425,9 +425,10 @@ class ChatAction(EventBuilder):
# If missing, try from the entity cache
try:
self._input_users.append(self._client._entity_cache[user_id])
self._input_users.append(self._client._mb_entity_cache.get(
utils.resolve_id(user_id)[0])._as_input_peer())
continue
except KeyError:
except AttributeError:
pass
return self._input_users or []