Fix client method calls and reading TLObjects

This commit is contained in:
Lonami Exo
2021-09-12 15:46:57 +02:00
parent c84043cf71
commit e9b97b5e4a
5 changed files with 81 additions and 63 deletions

View File

@@ -11,6 +11,7 @@ from .. import version, helpers, __name__ as __base_name__, _tl
from .._crypto import rsa
from .._misc import markdown, entitycache, statecache
from .._network import MTProtoSender, Connection, ConnectionTcpFull, TcpMTProxy
from .._tl.alltlobjects import LAYER
from ..sessions import Session, SQLiteSession, MemorySession
DEFAULT_DC_ID = 2
@@ -321,7 +322,7 @@ async def connect(self: 'TelegramClient') -> None:
self._init_request.query = _tl.fn.help.GetConfig()
await self._sender.send(_tl.fn.InvokeWithLayer(
_tl.alltlobjects.LAYER, self._init_request
LAYER, self._init_request
))
self._updates_handle = self.loop.create_task(self._update_loop())