From f65322af1811c763031246bf0e74f5b06ec78fe1 Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Tue, 7 Nov 2017 10:15:55 +0100 Subject: [PATCH] Fix entity database not using the phone on {phone: id} Closes #412 --- telethon/tl/entity_database.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telethon/tl/entity_database.py b/telethon/tl/entity_database.py index 0c92c75f..2273627b 100644 --- a/telethon/tl/entity_database.py +++ b/telethon/tl/entity_database.py @@ -132,7 +132,7 @@ class EntityDatabase: phone = getattr(entity, 'phone', None) if phone: - self._username_id[phone] = marked_id + self._phone_id[phone] = marked_id def _parse_key(self, key): """Parses the given string, integer or TLObject key into a