Skip to content

Commit

Permalink
Fix ignore_incoming_bot_events check in channels
Browse files Browse the repository at this point in the history
Fixes #417
  • Loading branch information
tulir committed Feb 7, 2020
1 parent 906d832 commit d58eb52
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mautrix_telegram/abstract_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,8 @@ async def update_message(self, original_update: UpdateMessage) -> None:
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

Expand Down

0 comments on commit d58eb52

Please sign in to comment.