From 9986b707ae81a984d2dd9d2b91ff4f8805c42b91 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Sat, 16 Dec 2017 01:05:25 +0100 Subject: [PATCH] Default to audio/mpeg mime type when sending audios --- pyrogram/client/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyrogram/client/client.py b/pyrogram/client/client.py index cca2d28a..aa632752 100644 --- a/pyrogram/client/client.py +++ b/pyrogram/client/client.py @@ -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=[