Persist session state and usage fixes

Catching up is now an option when creating the client.
This commit is contained in:
Lonami Exo
2022-01-23 19:46:37 +01:00
parent 015acf20c6
commit f547a00da3
4 changed files with 33 additions and 25 deletions

View File

@@ -95,3 +95,6 @@ class EntityCache:
for c in chats
if getattr(c, 'access_hash', None) and not getattr(c, 'min', None)
)
def get_all_entities(self):
return [Entity(ty, id, hash) for id, (hash, ty) in self.hash_map.items()]