From e9e164c679c226a13327ee5800ff040cb344ae5a Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Sat, 19 Dec 2020 13:35:12 +0200 Subject: [PATCH] Stringify URL when following redirects --- mautrix_telegram/commands/telegram/misc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mautrix_telegram/commands/telegram/misc.py b/mautrix_telegram/commands/telegram/misc.py index 0060619c..a058c79a 100644 --- a/mautrix_telegram/commands/telegram/misc.py +++ b/mautrix_telegram/commands/telegram/misc.py @@ -151,7 +151,7 @@ async def join(evt: CommandEvent) -> Optional[EventID]: if evt.config["bridge.invite_link_resolve"]: try: async with ClientSession() as sess, sess.get(url) as resp: - url = resp.url + url = str(resp.url) except InvalidURL: return await evt.reply("That doesn't look like a Telegram invite link.")