From 10eca821439cf4f2c2858bcb6585bcd75c404c2b Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Thu, 5 Oct 2017 12:29:52 +0200 Subject: [PATCH] Fix process_entities not working on list of entities --- telethon/tl/entity_database.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/telethon/tl/entity_database.py b/telethon/tl/entity_database.py index 94528cfd..93a9bb71 100644 --- a/telethon/tl/entity_database.py +++ b/telethon/tl/entity_database.py @@ -30,6 +30,10 @@ class EntityDatabase: return False # Save all input entities we know of + if not isinstance(tlobject, TLObject) and hasattr(tlobject, '__iter__'): + # This may be a list of users already for instance + return self.expand(tlobject) + entities = [] if hasattr(tlobject, 'chats') and hasattr(tlobject.chats, '__iter__'): entities.extend(tlobject.chats)