Merge branch 'develop' into asyncio

This commit is contained in:
Dan 2019-03-28 14:02:02 +01:00
commit f96a0b7674
6 changed files with 21 additions and 1 deletions

View File

@ -26,6 +26,10 @@ from .primitives import Int, Long
class FutureSalt(Object): class FutureSalt(Object):
ID = 0x0949d9dc ID = 0x0949d9dc
__slots__ = ["valid_since", "valid_until", "salt"]
QUALNAME = "FutureSalt"
def __init__(self, valid_since: int or datetime, valid_until: int or datetime, salt: int): def __init__(self, valid_since: int or datetime, valid_until: int or datetime, salt: int):
self.valid_since = valid_since self.valid_since = valid_since
self.valid_until = valid_until self.valid_until = valid_until

View File

@ -27,6 +27,10 @@ from .primitives import Int, Long
class FutureSalts(Object): class FutureSalts(Object):
ID = 0xae500895 ID = 0xae500895
__slots__ = ["req_msg_id", "now", "salts"]
QUALNAME = "FutureSalts"
def __init__(self, req_msg_id: int, now: int or datetime, salts: list): def __init__(self, req_msg_id: int, now: int or datetime, salts: list):
self.req_msg_id = req_msg_id self.req_msg_id = req_msg_id
self.now = now self.now = now

View File

@ -26,6 +26,10 @@ from .primitives import Int, Bytes
class GzipPacked(Object): class GzipPacked(Object):
ID = 0x3072cfa1 ID = 0x3072cfa1
__slots__ = ["packed_data"]
QUALNAME = "GzipPacked"
def __init__(self, packed_data: Object): def __init__(self, packed_data: Object):
self.packed_data = packed_data self.packed_data = packed_data

View File

@ -25,6 +25,10 @@ from .primitives import Int, Long
class Message(Object): class Message(Object):
ID = 0x5bb8e511 # hex(crc32(b"message msg_id:long seqno:int bytes:int body:Object = Message")) ID = 0x5bb8e511 # hex(crc32(b"message msg_id:long seqno:int bytes:int body:Object = Message"))
__slots__ = ["msg_id", "seq_no", "length", "body"]
QUALNAME = "Message"
def __init__(self, body: Object, msg_id: int, seq_no: int, length: int): def __init__(self, body: Object, msg_id: int, seq_no: int, length: int):
self.msg_id = msg_id self.msg_id = msg_id
self.seq_no = seq_no self.seq_no = seq_no

View File

@ -26,6 +26,10 @@ from .primitives import Int
class MsgContainer(Object): class MsgContainer(Object):
ID = 0x73f1f8dc ID = 0x73f1f8dc
__slots__ = ["messages"]
QUALNAME = "MsgContainer"
def __init__(self, messages: list): def __init__(self, messages: list):
self.messages = messages self.messages = messages

View File

@ -62,7 +62,7 @@ class SendChatAction(BaseClient):
action = action.value action = action.value
if "Upload" in action.__name__: if "Upload" in action.__name__:
action = action(progress) action = action(progress=progress)
else: else:
action = action() action = action()