From a1ba82c3b7a76ed11c74eebd8c060c1a0ada5718 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Fri, 23 Feb 2018 18:01:37 +0200 Subject: [PATCH] Actually use bridge.authless_relaybot_portals somewhere --- mautrix_telegram/bot.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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.")