mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 04:52:30 +00:00
Support autocast to InputMessage
This commit is contained in:
@@ -297,13 +297,11 @@ class NewMessage(EventBuilder):
|
||||
if self._reply_message is None:
|
||||
if isinstance(self.input_chat, types.InputPeerChannel):
|
||||
r = self._client(functions.channels.GetMessagesRequest(
|
||||
self.input_chat, [
|
||||
types.InputMessageID(self.message.reply_to_msg_id)
|
||||
]
|
||||
self.input_chat, [self.message.reply_to_msg_id]
|
||||
))
|
||||
else:
|
||||
r = self._client(functions.messages.GetMessagesRequest(
|
||||
[types.InputMessageID(self.message.reply_to_msg_id)]
|
||||
[self.message.reply_to_msg_id]
|
||||
))
|
||||
if not isinstance(r, types.messages.MessagesNotModified):
|
||||
self._reply_message = r.messages[0]
|
||||
|
Reference in New Issue
Block a user