Fix MTProtoSender should not send content-related queries

This commit is contained in:
Lonami Exo
2018-06-17 16:23:22 +02:00
parent 145d4b7105
commit d9d586171f
2 changed files with 5 additions and 11 deletions

View File

@@ -170,7 +170,6 @@ class TelegramBaseClient(abc.ABC):
self._connection = connection
self._sender = MTProtoSender(
state, connection, self._loop,
first_query=self._init_with(functions.help.GetConfigRequest()),
update_callback=self._handle_update
)
@@ -231,6 +230,9 @@ class TelegramBaseClient(abc.ABC):
await self._sender.connect(
self.session.server_address, self.session.port)
await self._sender.send(self._init_with(
functions.help.GetConfigRequest()))
if not had_auth:
self.session.auth_key = self._sender.state.auth_key
self.session.save()