Accept terms of service after successfully signing in

This commit is contained in:
Dan 2018-06-23 16:08:28 +02:00
parent f701ee46f6
commit fc541221ed

View File

@ -456,6 +456,7 @@ class Client(Methods, BaseClient):
phone_registered = r.phone_registered
phone_code_hash = r.phone_code_hash
terms_of_service = r.terms_of_service
if self.force_sms:
self.send(
@ -562,6 +563,8 @@ class Client(Methods, BaseClient):
else:
break
assert self.send(functions.help.AcceptTermsOfService(terms_of_service.id))
self.password = None
self.user_id = r.user.id