From 75ca28df49be6c93615f1c1b9d370897db6fc6fb Mon Sep 17 00:00:00 2001 From: Lonami Date: Mon, 16 Sep 2019 11:36:35 +0200 Subject: [PATCH] Parse t.me/@ URLs as valid usernames --- telethon/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telethon/utils.py b/telethon/utils.py index 05ab8ce7..5fcb4d42 100644 --- a/telethon/utils.py +++ b/telethon/utils.py @@ -50,7 +50,7 @@ mimetypes.add_type('audio/ogg', '.ogg') mimetypes.add_type('audio/flac', '.flac') USERNAME_RE = re.compile( - r'@|(?:https?://)?(?:www\.)?(?:telegram\.(?:me|dog)|t\.me)/(joinchat/)?' + r'@|(?:https?://)?(?:www\.)?(?:telegram\.(?:me|dog)|t\.me)/(@|joinchat/)?' ) TG_JOIN_RE = re.compile( r'tg://(join)\?invite='