Parse t.me/@<user> URLs as valid usernames

This commit is contained in:
Lonami
2019-09-16 11:36:35 +02:00
committed by GitHub
parent c1774276c2
commit 75ca28df49

View File

@@ -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='