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:
@@ -196,6 +196,9 @@ class Portal:
|
|||||||
async def can_user_perform(self, user: 'u.User', event: str, default: int = 50) -> bool:
|
async def can_user_perform(self, user: 'u.User', event: str, default: int = 50) -> bool:
|
||||||
if user.is_admin:
|
if user.is_admin:
|
||||||
return True
|
return True
|
||||||
|
if not self.mxid:
|
||||||
|
# No room for anybody to perform actions in
|
||||||
|
return False
|
||||||
try:
|
try:
|
||||||
await self.main_intent.get_power_levels(self.mxid)
|
await self.main_intent.get_power_levels(self.mxid)
|
||||||
except MatrixRequestError:
|
except MatrixRequestError:
|
||||||
|
|||||||
Reference in New Issue
Block a user