2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-29 13:27:47 +00:00

Don't GetTermsOfService() anymore

This commit is contained in:
Dan 2018-03-15 12:03:02 +01:00
parent e3cc2f121d
commit 756311710c

View File

@ -122,8 +122,6 @@ class Session:
self.is_connected = Event() self.is_connected = Event()
def start(self): def start(self):
terms = None
while True: while True:
try: try:
self.connection.connect() self.connection.connect()
@ -141,7 +139,7 @@ class Session:
self.next_salt_thread.start() self.next_salt_thread.start()
if not self.is_cdn: if not self.is_cdn:
terms = self._send( self._send(
functions.InvokeWithLayer( functions.InvokeWithLayer(
layer, layer,
functions.InitConnection( functions.InitConnection(
@ -150,10 +148,10 @@ class Session:
self.SYSTEM_VERSION, self.SYSTEM_VERSION,
self.APP_VERSION, self.APP_VERSION,
"en", "", "en", "en", "", "en",
functions.help.GetTermsOfService(), functions.help.GetConfig(),
) )
) )
).text )
self.ping_thread = Thread(target=self.ping, name="PingThread") self.ping_thread = Thread(target=self.ping, name="PingThread")
self.ping_thread.start() self.ping_thread.start()
@ -168,8 +166,6 @@ class Session:
log.debug("Session started") log.debug("Session started")
return terms
def stop(self): def stop(self):
self.is_connected.clear() self.is_connected.clear()