diff --git a/mautrix_telegram/bot.py b/mautrix_telegram/bot.py index 0b3f5146..020c12ee 100644 --- a/mautrix_telegram/bot.py +++ b/mautrix_telegram/bot.py @@ -90,11 +90,14 @@ class Bot(AbstractUser): self.db.commit() async def handle_command_portal(self, portal, reply): + if not config["bridge.authless_relaybot_portals"]: + return await reply("This bridge doesn't allow portal creation/invites from Telegram.") + await portal.create_matrix_room(self) if portal.mxid: if portal.username: return await reply( - f"Portal is public: [portal.alias](https://matrix.to/#/{portal.alias})") + f"Portal is public: [{portal.alias}](https://matrix.to/#/{portal.alias})") else: return await reply( "Portal is not public. Use `/invite ` to get an invite.")