Default to audio/mpeg mime type when sending audios

This commit is contained in:
Dan 2017-12-16 01:05:25 +01:00
parent fadecb1061
commit 9986b707ae

View File

@ -580,7 +580,7 @@ class Client:
functions.messages.SendMedia(
peer=self.resolve_peer(chat_id),
media=types.InputMediaUploadedDocument(
mime_type=mimetypes.types_map["." + audio.split(".")[-1]],
mime_type=mimetypes.types_map.get("." + audio.split(".")[-1], "audio/mpeg"),
file=self.save_file(audio),
caption=caption,
attributes=[