Manually register webp mimetype

Otherwise, sending stickers would fail on some systems.
This commit is contained in:
Lonami Exo 2018-08-27 17:19:10 +02:00
parent 8a9650f131
commit 0e91fc3668

View File

@ -24,6 +24,10 @@ try:
except ImportError:
hachoir = None
# .webp mimetype is unknown on some operative systems, so stickers won't
# work. Manually register it here to make sure stickers work everywhere.
mimetypes.add_type('image/webp', '.webp')
USERNAME_RE = re.compile(
r'@|(?:https?://)?(?:www\.)?(?:telegram\.(?:me|dog)|t\.me)/(joinchat/)?'
)