From dd83d6278cd63c9e86ac7cba6de7b6f587094bdc Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Mon, 10 Jan 2022 23:23:16 +0200 Subject: [PATCH] Add support for t.me/+code invite links --- mautrix_telegram/commands/telegram/misc.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mautrix_telegram/commands/telegram/misc.py b/mautrix_telegram/commands/telegram/misc.py index 5b1a70ca..2bff167c 100644 --- a/mautrix_telegram/commands/telegram/misc.py +++ b/mautrix_telegram/commands/telegram/misc.py @@ -208,6 +208,9 @@ async def join(evt: CommandEvent) -> EventID | None: link_type = data["type"] if link_type: link_type = link_type.lower() + elif identifier.startswith("+"): + link_type = "joinchat" + identifier = identifier[1:] updates, _ = await _join(evt, identifier, link_type) if not updates: return None