Fix UpdateDeleteMessages doesn't have .channel_id (#619)

This commit is contained in:
Lonami Exo 2018-02-19 20:23:52 +01:00
parent 1eeedc613b
commit bf086f3e80

View File

@ -803,8 +803,12 @@ class MessageChanged(_EventBuilder):
if isinstance(update, (types.UpdateEditMessage,
types.UpdateEditChannelMessage)):
event = MessageChanged.Event(edit_msg=update.message)
elif isinstance(update, (types.UpdateDeleteMessages,
types.UpdateDeleteChannelMessages)):
elif isinstance(update, types.UpdateDeleteMessages):
event = MessageChanged.Event(
deleted_ids=update.messages,
peer=None
)
elif isinstance(update, types.UpdateDeleteChannelMessages):
event = MessageChanged.Event(
deleted_ids=update.messages,
peer=types.PeerChannel(update.channel_id)