mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-26 11:23:46 +03:00
Fix NewMessage event not dropping MessageService
This commit is contained in:
parent
2e0a8d6bce
commit
c79fbe451f
|
@ -63,6 +63,8 @@ class NewMessage(_EventBuilder):
|
||||||
def build(self, update):
|
def build(self, update):
|
||||||
if isinstance(update,
|
if isinstance(update,
|
||||||
(types.UpdateNewMessage, types.UpdateNewChannelMessage)):
|
(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)
|
event = NewMessage.Event(update.message)
|
||||||
elif isinstance(update, types.UpdateShortMessage):
|
elif isinstance(update, types.UpdateShortMessage):
|
||||||
event = NewMessage.Event(types.Message(
|
event = NewMessage.Event(types.Message(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user