Avoid editing events.NewMessage that are forwards

This commit is contained in:
Lonami Exo 2018-03-08 20:18:10 +01:00
parent 9d46bb35c8
commit cf650e061e

View File

@ -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