From 1b987be5622b33da8336916689f87200ac75162c Mon Sep 17 00:00:00 2001 From: Daniele Rogora Date: Wed, 2 Oct 2019 19:37:53 +0200 Subject: [PATCH] Fixes parentheses when checking for bots, which was causing AttributeError --- mautrix_telegram/portal/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mautrix_telegram/portal/base.py b/mautrix_telegram/portal/base.py index 52a98edb..56c18313 100644 --- a/mautrix_telegram/portal/base.py +++ b/mautrix_telegram/portal/base.py @@ -147,8 +147,8 @@ class BasePortal(ABC): @property def has_bot(self) -> bool: - return ((bool(self.bot) and self.bot.is_in_chat(self.tgid)) - or (self.peer_type == "user" and self.tg_receiver == self.bot.tgid)) + return (bool(self.bot) and (self.bot.is_in_chat(self.tgid) + or (self.peer_type == "user" and self.tg_receiver == self.bot.tgid))) @property def main_intent(self) -> IntentAPI: