Skip to content

Commit

Permalink
Fix sending no-sound videos in media group & sending media as videos …
Browse files Browse the repository at this point in the history
…by default in `send_video` (#72)

* fix: sending all videos in media groups as videos (not GIFs)

* feature: send media as video by default in `send_video`
  • Loading branch information
Danipulok committed Jun 16, 2024
1 parent c299846 commit 4f5fc6b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pyrogram/methods/messages/send_media_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ async def send_media_group(
thumb=await self.save_file(i.thumb),
spoiler=i.has_spoiler,
mime_type=self.guess_mime_type(i.media) or "video/mp4",
nosound_video=i.no_sound,
nosound_video=True,
attributes=[
raw.types.DocumentAttributeVideo(
supports_streaming=i.supports_streaming or None,
Expand Down Expand Up @@ -267,7 +267,7 @@ async def send_media_group(
thumb=await self.save_file(i.thumb),
spoiler=i.has_spoiler,
mime_type=self.guess_mime_type(getattr(i.media, "name", "video.mp4")) or "video/mp4",
nosound_video=i.no_sound,
nosound_video=True,
attributes=[
raw.types.DocumentAttributeVideo(
supports_streaming=i.supports_streaming or None,
Expand Down
2 changes: 1 addition & 1 deletion pyrogram/methods/messages/send_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ async def send_video(
quote_offset: int = None,
schedule_date: datetime = None,
protect_content: bool = None,
no_sound: bool = None,
no_sound: bool = True,
business_connection_id: str = None,
reply_markup: Union[
"types.InlineKeyboardMarkup",
Expand Down

0 comments on commit 4f5fc6b

Please sign in to comment.