Fix 2FA login error, closes #442, replaces #443

This commit is contained in:
Mads Marquart
2019-07-20 16:00:32 +02:00
parent 04aec15833
commit e136d77ade
2 changed files with 7 additions and 2 deletions

View File

@@ -251,7 +251,12 @@ class Client(object):
for i in range(1, max_tries + 1):
try:
state = State.login(email, password, user_agent=user_agent)
state = State.login(
email,
password,
on_2fa_callback=self.on2FACode,
user_agent=user_agent,
)
uid = state.get_user_id()
if uid is None:
raise FBchatException("Could not find user id")