From fc541221eddbb4f29b3fba13f5a533c8c8514279 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Sat, 23 Jun 2018 16:08:28 +0200 Subject: [PATCH] Accept terms of service after successfully signing in --- pyrogram/client/client.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyrogram/client/client.py b/pyrogram/client/client.py index 24bf09eb..17833310 100644 --- a/pyrogram/client/client.py +++ b/pyrogram/client/client.py @@ -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