Skip to content

Commit

Permalink
pyrofork: Add has_spoiler in get_input_media_from_file_id
Browse files Browse the repository at this point in the history
  • Loading branch information
yasirarism authored Jan 29, 2025
1 parent 361acdb commit 8f9797f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pyrogram/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ async def ainput(prompt: str = "", *, hide: bool = False):
def get_input_media_from_file_id(
file_id: str,
expected_file_type: FileType = None,
ttl_seconds: int = None
ttl_seconds: int = None,
has_spoiler: bool = None
) -> Union["raw.types.InputMediaPhoto", "raw.types.InputMediaDocument"]:
try:
decoded = FileId.decode(file_id)
Expand All @@ -79,6 +80,7 @@ def get_input_media_from_file_id(
access_hash=decoded.access_hash,
file_reference=decoded.file_reference
),
spoiler=has_spoiler,
ttl_seconds=ttl_seconds
)

Expand All @@ -89,6 +91,7 @@ def get_input_media_from_file_id(
access_hash=decoded.access_hash,
file_reference=decoded.file_reference
),
spoiler=has_spoiler,
ttl_seconds=ttl_seconds
)

Expand Down

0 comments on commit 8f9797f

Please sign in to comment.