From a3e5ba88621be8b94eb21c09cec44a87fb4bb12c Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Sat, 9 Dec 2017 02:24:21 +0100 Subject: [PATCH] Use MTProto 2.0 instead of 1.0 --- pyrogram/session/session.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyrogram/session/session.py b/pyrogram/session/session.py index a23f3eea..9f3e2e87 100644 --- a/pyrogram/session/session.py +++ b/pyrogram/session/session.py @@ -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)