mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-03-03 10:45:52 +03:00
Fix MessageEdited ignoring NewMessage constructor arguments
These include outgoing/incoming and pattern which are now handled.
This commit is contained in:
parent
d5bc3c1a6c
commit
48869f0f4e
|
@ -262,8 +262,11 @@ class NewMessage(_EventBuilder):
|
|||
else:
|
||||
return
|
||||
|
||||
# Short-circuit if we let pass all events
|
||||
event._entities = update.entities
|
||||
return self._message_filter_event(event)
|
||||
|
||||
def _message_filter_event(self, event):
|
||||
# Short-circuit if we let pass all events
|
||||
if all(x is None for x in (self.incoming, self.outgoing, self.chats,
|
||||
self.pattern)):
|
||||
return event
|
||||
|
@ -1031,7 +1034,7 @@ class MessageEdited(NewMessage):
|
|||
return
|
||||
|
||||
event._entities = update.entities
|
||||
return self._filter_event(event)
|
||||
return self._message_filter_event(event)
|
||||
|
||||
|
||||
class MessageDeleted(_EventBuilder):
|
||||
|
|
Loading…
Reference in New Issue
Block a user