Add missing UpdateShortChatMessage case on events.NewMessage

This commit is contained in:
Lonami Exo 2018-02-17 11:40:38 +01:00
parent 6d993af338
commit d581589313

View File

@ -209,6 +209,22 @@ class NewMessage(_EventBuilder):
reply_to_msg_id=update.reply_to_msg_id, reply_to_msg_id=update.reply_to_msg_id,
entities=update.entities entities=update.entities
)) ))
elif isinstance(update, types.UpdateShortChatMessage):
event = NewMessage.Event(types.Message(
out=update.out,
mentioned=update.mentioned,
media_unread=update.media_unread,
silent=update.silent,
id=update.id,
from_id=update.from_id,
to_id=types.PeerChat(update.chat_id),
message=update.message,
date=update.date,
fwd_from=update.fwd_from,
via_bot_id=update.via_bot_id,
reply_to_msg_id=update.reply_to_msg_id,
entities=update.entities
))
else: else:
return return