mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-17 21:22:40 +00:00
Merge branch 'develop' into asyncio
This commit is contained in:
commit
f96a0b7674
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
@ -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()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user