Fix TelegramClient not actually supporting temp sessions (#78)

This commit is contained in:
Lonami Exo 2017-05-11 14:08:38 +02:00
parent 048bc81b74
commit f64244eb44

View File

@ -63,7 +63,7 @@ class TelegramClient:
self.api_hash = api_hash self.api_hash = api_hash
# Determine what session object we have # Determine what session object we have
if isinstance(session, str): if isinstance(session, str) or session is None:
self.session = Session.try_load_or_create_new(session) self.session = Session.try_load_or_create_new(session)
elif isinstance(session, Session): elif isinstance(session, Session):
self.session = session self.session = session