fix chat_id fields

This commit is contained in:
2019-01-28 00:49:17 +03:00
parent 188c8c1b1a
commit 5306a033b2
3 changed files with 28 additions and 5 deletions

View File

@@ -15,10 +15,10 @@ Session.notice_displayed = True
def get_client():
config._reload_maybe()
pyrogram_session = config.pyrogram_session.replace('.session', '')
if not pyrogram_session or not config.pyrogram_app_id or not config.pyrogram_app_hash:
if not config.pyrogram_session or not config.pyrogram_app_id or not config.pyrogram_app_hash:
raise RuntimeError('Pyrogram is not configured')
session_path = os.path.relpath(default_storage.path(pyrogram_session))
session_path = os.path.relpath(default_storage.path(config.pyrogram_session.replace('.session', '')))
return Client(session_path, config.pyrogram_app_id, config.pyrogram_app_hash)