mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-28 00:56:19 +00:00
Default to audio/mpeg mime type when sending audios
This commit is contained in:
parent
fadecb1061
commit
9986b707ae
@ -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=[
|
||||||
|
Loading…
Reference in New Issue
Block a user