mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-24 07:51:44 +00:00
Use MTProto 2.0 instead of 1.0
This commit is contained in:
parent
42f9a2d699
commit
a3e5ba8862
@ -264,7 +264,7 @@ class Session:
|
||||
|
||||
def unpack_dispatch_and_ack(self, packet: bytes):
|
||||
# TODO: A better dispatcher
|
||||
data = self.unpack(BytesIO(packet))
|
||||
data = self.unpack2(BytesIO(packet))
|
||||
|
||||
messages = (
|
||||
data.body.messages
|
||||
@ -394,7 +394,7 @@ class Session:
|
||||
if wait_response:
|
||||
self.results[msg_id] = Result()
|
||||
|
||||
payload = self.pack(message)
|
||||
payload = self.pack2(message)
|
||||
|
||||
try:
|
||||
self.connection.send(payload)
|
||||
|
Loading…
Reference in New Issue
Block a user