Fixes parentheses when checking for bots, which was causing AttributeError

This commit is contained in:
Daniele Rogora
2019-10-02 19:37:53 +02:00
committed by Tulir Asokan
parent ea633ce3f9
commit 1b987be562
+2 -2
View File
@@ -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: