Don't try permission checks on rooms that aren't bridged

This is the proper way to fix https://github.com/tulir/mautrix-telegram/pull/235
This commit is contained in:
Travis Ralston
2018-10-19 19:31:33 -06:00
parent 247c75191b
commit 7f23d4cf68
+3
View File
@@ -196,6 +196,9 @@ class Portal:
async def can_user_perform(self, user: 'u.User', event: str, default: int = 50) -> bool:
if user.is_admin:
return True
if not self.mxid:
# No room for anybody to perform actions in
return False
try:
await self.main_intent.get_power_levels(self.mxid)
except MatrixRequestError: