Fix being able to make room with inexistant user

This commit is contained in:
miruka 2019-12-04 09:43:04 -04:00
parent 470b031a6f
commit a992b51ac5

View File

@ -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(