Fix ignore_incoming_bot_events check in channels

Fixes #417
This commit is contained in:
Tulir Asokan
2020-02-07 17:36:35 +02:00
parent 906d8322e3
commit d58eb52944
+2 -1
View File
@@ -421,7 +421,8 @@ class AbstractUser(ABC):
f" in unbridged chat {portal.tgid_log}")
return
if self.ignore_incoming_bot_events and self.relaybot and sender.id == self.relaybot.tgid:
if ((self.ignore_incoming_bot_events and self.relaybot
and sender and sender.id == self.relaybot.tgid)):
self.log.debug(f"Ignoring relaybot-sent message %s to %s", update.id, portal.tgid_log)
return