mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-02 21:44:51 +00:00
Merge branch 'develop' into asyncio
This commit is contained in:
commit
f96a0b7674
6 changed files with 21 additions and 1 deletions
|
|
@ -26,6 +26,10 @@ from .primitives import Int, Long
|
|||
class FutureSalt(Object):
|
||||
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):
|
||||
self.valid_since = valid_since
|
||||
self.valid_until = valid_until
|
||||
|
|
|
|||
|
|
@ -27,6 +27,10 @@ from .primitives import Int, Long
|
|||
class FutureSalts(Object):
|
||||
ID = 0xae500895
|
||||
|
||||
__slots__ = ["req_msg_id", "now", "salts"]
|
||||
|
||||
QUALNAME = "FutureSalts"
|
||||
|
||||
def __init__(self, req_msg_id: int, now: int or datetime, salts: list):
|
||||
self.req_msg_id = req_msg_id
|
||||
self.now = now
|
||||
|
|
|
|||
|
|
@ -26,6 +26,10 @@ from .primitives import Int, Bytes
|
|||
class GzipPacked(Object):
|
||||
ID = 0x3072cfa1
|
||||
|
||||
__slots__ = ["packed_data"]
|
||||
|
||||
QUALNAME = "GzipPacked"
|
||||
|
||||
def __init__(self, packed_data: Object):
|
||||
self.packed_data = packed_data
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,10 @@ from .primitives import Int, Long
|
|||
class Message(Object):
|
||||
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):
|
||||
self.msg_id = msg_id
|
||||
self.seq_no = seq_no
|
||||
|
|
|
|||
|
|
@ -26,6 +26,10 @@ from .primitives import Int
|
|||
class MsgContainer(Object):
|
||||
ID = 0x73f1f8dc
|
||||
|
||||
__slots__ = ["messages"]
|
||||
|
||||
QUALNAME = "MsgContainer"
|
||||
|
||||
def __init__(self, messages: list):
|
||||
self.messages = messages
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ class SendChatAction(BaseClient):
|
|||
action = action.value
|
||||
|
||||
if "Upload" in action.__name__:
|
||||
action = action(progress)
|
||||
action = action(progress=progress)
|
||||
else:
|
||||
action = action()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue