mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-10 19:46:36 +03:00
Fix get_message_id after custom message patch
This commit is contained in:
parent
96742334a4
commit
223b007a55
|
@ -396,16 +396,13 @@ def get_input_message(message):
|
|||
|
||||
|
||||
def get_message_id(message):
|
||||
"""Sanitizes the 'reply_to' parameter a user may send"""
|
||||
"""Similar to :meth:`get_input_peer`, but for message IDs."""
|
||||
if message is None:
|
||||
return None
|
||||
|
||||
if isinstance(message, int):
|
||||
return message
|
||||
|
||||
if hasattr(message, 'original_message'):
|
||||
return message.original_message.id
|
||||
|
||||
try:
|
||||
if message.SUBCLASS_OF_ID == 0x790009e3:
|
||||
# hex(crc32(b'Message')) = 0x790009e3
|
||||
|
|
Loading…
Reference in New Issue
Block a user