From 87b3fb4c1b58b36848b1efdf3088a0397d107a08 Mon Sep 17 00:00:00 2001 From: KurimuzonAkuma Date: Wed, 24 Apr 2024 11:34:16 +0300 Subject: [PATCH] Fix edit_inline_media --- pyrogram/methods/messages/edit_inline_media.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyrogram/methods/messages/edit_inline_media.py b/pyrogram/methods/messages/edit_inline_media.py index e06ded2a..1f554651 100644 --- a/pyrogram/methods/messages/edit_inline_media.py +++ b/pyrogram/methods/messages/edit_inline_media.py @@ -213,7 +213,7 @@ class EditInlineMedia: file_reference=uploaded_media.photo.file_reference ), spoiler=getattr(media, "has_spoiler", None) - ) if isinstance(media, types.InputMediaPhoto) else raw.types.InputMediaDocument( + ) if isinstance(uploaded_media, raw.types.MessageMediaPhoto) else raw.types.InputMediaDocument( id=raw.types.InputDocument( id=uploaded_media.document.id, access_hash=uploaded_media.document.access_hash,