From fccee4d64357fd9137bc163e8c174a4714ff2dfc Mon Sep 17 00:00:00 2001 From: KurimuzonAkuma Date: Wed, 10 Jan 2024 14:54:54 +0300 Subject: [PATCH] Fix message.story parsing in some cases --- pyrogram/types/messages_and_media/message.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyrogram/types/messages_and_media/message.py b/pyrogram/types/messages_and_media/message.py index b8d6cca5..2e8c99bb 100644 --- a/pyrogram/types/messages_and_media/message.py +++ b/pyrogram/types/messages_and_media/message.py @@ -891,7 +891,7 @@ class Message(Object, Update): else: try: story = await client.get_stories(utils.get_peer_id(media.peer), media.id) - except BotMethodInvalid: + except (BotMethodInvalid, ChannelPrivate): story = await types.Story._parse(client, media, users, chats, media.peer) media_type = enums.MessageMediaType.STORY