mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-26 03:13:45 +03:00
Manually register ogg mimetype too (#973)
This commit is contained in:
parent
3a0b091210
commit
36df6d1bf9
|
@ -24,9 +24,10 @@ try:
|
||||||
except ImportError:
|
except ImportError:
|
||||||
hachoir = None
|
hachoir = None
|
||||||
|
|
||||||
# .webp mimetype is unknown on some operative systems, so stickers won't
|
# .webp (stickers) and .ogg (some voice notes) mimetypes are unknown on some
|
||||||
# work. Manually register it here to make sure stickers work everywhere.
|
# operative systems. Manually register them here to make them work everywhere.
|
||||||
mimetypes.add_type('image/webp', '.webp')
|
mimetypes.add_type('image/webp', '.webp')
|
||||||
|
mimetypes.add_type('audio/ogg', '.ogg')
|
||||||
|
|
||||||
USERNAME_RE = re.compile(
|
USERNAME_RE = re.compile(
|
||||||
r'@|(?:https?://)?(?:www\.)?(?:telegram\.(?:me|dog)|t\.me)/(joinchat/)?'
|
r'@|(?:https?://)?(?:www\.)?(?:telegram\.(?:me|dog)|t\.me)/(joinchat/)?'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user