From e762acc786d20db43d7c4c426fe7a850340aec5d Mon Sep 17 00:00:00 2001 From: KurimuzonAkuma Date: Mon, 30 Oct 2023 23:33:32 +0300 Subject: [PATCH] Fix Story.copy --- pyrogram/types/messages_and_media/story.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/pyrogram/types/messages_and_media/story.py b/pyrogram/types/messages_and_media/story.py index 20fc006a..41feb6e4 100644 --- a/pyrogram/types/messages_and_media/story.py +++ b/pyrogram/types/messages_and_media/story.py @@ -1355,22 +1355,13 @@ class Story(Object, Update): Raises: RPCError: In case of a Telegram RPC error. """ - file_id = None - - if self.photo: - file_id = self.photo.file_id - elif self.video: - file_id = self.video.file_id - else: - raise ValueError("Unknown media type") - if caption is None: caption = self.caption or "" caption_entities = self.caption_entities return await self._client.send_story( chat_id=chat_id, - media=file_id, + media=await self.download(in_memory=True), caption=caption, period=period, protect_content=protect_content,