From a992b51ac505fe51f73836d3befb92545ed1a915 Mon Sep 17 00:00:00 2001 From: miruka Date: Wed, 4 Dec 2019 09:43:04 -0400 Subject: [PATCH] Fix being able to make room with inexistant user --- src/python/matrix_client.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/python/matrix_client.py b/src/python/matrix_client.py index 3d0bfb2f..2a5f7297 100644 --- a/src/python/matrix_client.py +++ b/src/python/matrix_client.py @@ -479,9 +479,7 @@ class MatrixClient(nio.AsyncClient): if invite == self.user_id: raise InvalidUserInContext(invite) - try: - await self.get_profile(invite) - except MatrixError: + if isinstance(await self.get_profile(invite), nio.ProfileGetError): raise UserNotFound(invite) response = await super().room_create(