mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-05 03:22:29 +00:00
Remove redundant entity cache
Progress towards #3989. May also help with #3235.
This commit is contained in:
@@ -585,9 +585,9 @@ def _get_entity_pair(entity_id, entities, cache,
|
||||
"""
|
||||
entity = entities.get(entity_id)
|
||||
try:
|
||||
input_entity = cache[entity_id]
|
||||
except KeyError:
|
||||
# KeyError is unlikely, so another TypeError won't hurt
|
||||
input_entity = cache.get(resolve_id(entity_id)[0])._as_input_peer()
|
||||
except AttributeError:
|
||||
# AttributeError is unlikely, so another TypeError won't hurt
|
||||
try:
|
||||
input_entity = get_input_peer(entity)
|
||||
except TypeError:
|
||||
|
Reference in New Issue
Block a user