Check if client is connected before checking if authorized. Fixes #215

This commit is contained in:
Tulir Asokan
2018-11-15 11:45:36 +02:00
parent 2dfc05db5f
commit 720210ac08
+1 -1
View File
@@ -149,7 +149,7 @@ class AbstractUser(ABC):
raise NotImplementedError()
async def is_logged_in(self) -> bool:
return self.client and await self.client.is_user_authorized()
return self.client and self.client.is_connected() and await self.client.is_user_authorized()
async def has_full_access(self, allow_bot: bool = False) -> bool:
return (self.puppet_whitelisted