mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-06-18 11:06:39 +00: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,
|
Returns ``None`` if the message was incoming,
|
||||||
or the edited message otherwise.
|
or the edited message otherwise.
|
||||||
"""
|
"""
|
||||||
|
if self.message.fwd_from:
|
||||||
|
return None
|
||||||
if not self.message.out:
|
if not self.message.out:
|
||||||
if not isinstance(self.message.to_id, types.PeerUser):
|
if not isinstance(self.message.to_id, types.PeerUser):
|
||||||
return None
|
return None
|
||||||
|
Loading…
Reference in New Issue
Block a user