Fix ignore_incoming_bot_events check in channels

Fixes #417
This commit is contained in:
Tulir Asokan
2020-02-08 13:28:07 +02:00
parent 07edcc4867
commit 62efc39eed
+2 -1
View File
@@ -421,7 +421,8 @@ class AbstractUser(ABC):
f" in unbridged chat {portal.tgid_log}") f" in unbridged chat {portal.tgid_log}")
return 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) self.log.debug(f"Ignoring relaybot-sent message %s to %s", update.id, portal.tgid_log)
return return