Fix process_entities not working on list of entities

This commit is contained in:
Lonami Exo 2017-10-05 12:29:52 +02:00
parent d2e244817a
commit 10eca82143

View File

@ -30,6 +30,10 @@ class EntityDatabase:
return False return False
# Save all input entities we know of # 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 = [] entities = []
if hasattr(tlobject, 'chats') and hasattr(tlobject.chats, '__iter__'): if hasattr(tlobject, 'chats') and hasattr(tlobject.chats, '__iter__'):
entities.extend(tlobject.chats) entities.extend(tlobject.chats)