pyrofork: Add has_spoiler in get_input_media_from_file_id

This commit is contained in:
Yasir Aris M 2025-01-29 07:14:39 +07:00 committed by GitHub
parent 361acdbfd7
commit 8f9797f57c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)
@ -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
)
@ -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
)