mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-23 23:34:28 +00:00
Check empty messages first of all
This commit is contained in:
parent
8d03850d03
commit
e2cce1b1e6
@ -433,6 +433,9 @@ class Message(Object, Update):
|
|||||||
is_scheduled: bool = False,
|
is_scheduled: bool = False,
|
||||||
replies: int = 1
|
replies: int = 1
|
||||||
):
|
):
|
||||||
|
if isinstance(message, raw.types.MessageEmpty):
|
||||||
|
return Message(message_id=message.id, empty=True, client=client)
|
||||||
|
|
||||||
user_id = utils.get_raw_peer_id(message.from_id) or utils.get_raw_peer_id(message.peer_id)
|
user_id = utils.get_raw_peer_id(message.from_id) or utils.get_raw_peer_id(message.peer_id)
|
||||||
if user_id not in users:
|
if user_id not in users:
|
||||||
try:
|
try:
|
||||||
@ -446,9 +449,6 @@ class Message(Object, Update):
|
|||||||
else:
|
else:
|
||||||
users[r.id] = r
|
users[r.id] = r
|
||||||
|
|
||||||
if isinstance(message, raw.types.MessageEmpty):
|
|
||||||
return Message(message_id=message.id, empty=True, client=client)
|
|
||||||
|
|
||||||
if isinstance(message, raw.types.MessageService):
|
if isinstance(message, raw.types.MessageService):
|
||||||
action = message.action
|
action = message.action
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user