mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-02-16 19:41:07 +03:00
Avoid editing events.NewMessage that are forwards
This commit is contained in:
parent
9d46bb35c8
commit
cf650e061e
|
@ -340,6 +340,8 @@ class NewMessage(_EventBuilder):
|
|||
Returns ``None`` if the message was incoming,
|
||||
or the edited message otherwise.
|
||||
"""
|
||||
if self.message.fwd_from:
|
||||
return None
|
||||
if not self.message.out:
|
||||
if not isinstance(self.message.to_id, types.PeerUser):
|
||||
return None
|
||||
|
|
Loading…
Reference in New Issue
Block a user