mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-30 13:57:54 +00:00
Default to audio/mpeg mime type when sending audios
This commit is contained in:
@@ -580,7 +580,7 @@ class Client:
|
|||||||
functions.messages.SendMedia(
|
functions.messages.SendMedia(
|
||||||
peer=self.resolve_peer(chat_id),
|
peer=self.resolve_peer(chat_id),
|
||||||
media=types.InputMediaUploadedDocument(
|
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),
|
file=self.save_file(audio),
|
||||||
caption=caption,
|
caption=caption,
|
||||||
attributes=[
|
attributes=[
|
||||||
|
Reference in New Issue
Block a user