mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-27 16:45:19 +00:00
Fix Story.copy
This commit is contained in:
parent
21a87b545a
commit
e762acc786
@ -1355,22 +1355,13 @@ class Story(Object, Update):
|
|||||||
Raises:
|
Raises:
|
||||||
RPCError: In case of a Telegram RPC error.
|
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:
|
if caption is None:
|
||||||
caption = self.caption or ""
|
caption = self.caption or ""
|
||||||
caption_entities = self.caption_entities
|
caption_entities = self.caption_entities
|
||||||
|
|
||||||
return await self._client.send_story(
|
return await self._client.send_story(
|
||||||
chat_id=chat_id,
|
chat_id=chat_id,
|
||||||
media=file_id,
|
media=await self.download(in_memory=True),
|
||||||
caption=caption,
|
caption=caption,
|
||||||
period=period,
|
period=period,
|
||||||
protect_content=protect_content,
|
protect_content=protect_content,
|
||||||
|
Loading…
Reference in New Issue
Block a user