mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-10 19:46:36 +03:00
Fix from_users filter not accounting for None from_id
This commit is contained in:
parent
cb92a40156
commit
20606b3a71
|
@ -156,7 +156,7 @@ class NewMessage(EventBuilder):
|
|||
return
|
||||
|
||||
if self.from_users is not None:
|
||||
if utils.get_peer_id(event.message.from_id) not in self.from_users:
|
||||
if event.message.sender_id not in self.from_users:
|
||||
return
|
||||
|
||||
if self.pattern:
|
||||
|
|
|
@ -31,9 +31,7 @@ class Forward(ChatGetter, SenderGetter):
|
|||
self.original_fwd = original
|
||||
|
||||
sender_id = sender = input_sender = peer = chat = input_chat = None
|
||||
if not original.from_id:
|
||||
pass
|
||||
else:
|
||||
if original.from_id:
|
||||
ty = helpers._entity_type(original.from_id)
|
||||
if ty == helpers._EntityType.USER:
|
||||
sender_id = utils.get_peer_id(original.from_id)
|
||||
|
|
Loading…
Reference in New Issue
Block a user