Fix NewMessage event not dropping MessageService

This commit is contained in:
Lonami Exo 2018-02-07 14:06:36 +01:00
parent 2e0a8d6bce
commit c79fbe451f

View File

@ -63,6 +63,8 @@ class NewMessage(_EventBuilder):
def build(self, update):
if isinstance(update,
(types.UpdateNewMessage, types.UpdateNewChannelMessage)):
if not isinstance(update.message, types.Message):
return # We don't care about MessageService's here
event = NewMessage.Event(update.message)
elif isinstance(update, types.UpdateShortMessage):
event = NewMessage.Event(types.Message(