Support autocast to InputMessage

This commit is contained in:
Lonami Exo
2018-04-23 11:05:38 +02:00
parent 6ecef42ec7
commit f31ca142a3
6 changed files with 25 additions and 19 deletions

View File

@@ -118,15 +118,11 @@ class EventCommon(abc.ABC):
try:
if isinstance(chat, types.InputPeerChannel):
result = self._client(
functions.channels.GetMessagesRequest(chat, [
types.InputMessageID(msg_id)
])
functions.channels.GetMessagesRequest(chat, [msg_id])
)
else:
result = self._client(
functions.messages.GetMessagesRequest([
types.InputMessageID(msg_id)
])
functions.messages.GetMessagesRequest([msg_id])
)
except RPCError:
return None, None