diff --git a/pyrogram/types/bots_and_keyboards/requested_chats.py b/pyrogram/types/bots_and_keyboards/requested_chats.py index 8322ec2a..e132cf9d 100644 --- a/pyrogram/types/bots_and_keyboards/requested_chats.py +++ b/pyrogram/types/bots_and_keyboards/requested_chats.py @@ -16,6 +16,8 @@ # You should have received a copy of the GNU Lesser General Public License # along with Pyrogram. If not, see . +from typing import List + import pyrogram from pyrogram import enums from pyrogram import raw, utils, types @@ -38,7 +40,7 @@ class RequestedChats(Object): self, *, client: "pyrogram.Client" = None, button_id: int, - chats: bool, + chats: List["types.Chat"], ): super().__init__(client) diff --git a/pyrogram/types/messages_and_media/message.py b/pyrogram/types/messages_and_media/message.py index 1a91902f..6ba52a3b 100644 --- a/pyrogram/types/messages_and_media/message.py +++ b/pyrogram/types/messages_and_media/message.py @@ -1069,9 +1069,9 @@ class Message(Object, Update): parsed_message.reply_to_message_id = message.reply_to.reply_to_msg_id parsed_message.reply_to_top_message_id = message.reply_to.reply_to_top_id - else: + elif isinstance(message.reply_to, raw.types.MessageReplyStoryHeader): parsed_message.reply_to_story_id = message.reply_to.story_id - parsed_message.reply_to_story_user_id = message.reply_to.user_id + parsed_message.reply_to_story_user_id = utils.get_peer_id(message.reply_to.peer) if replies: if parsed_message.reply_to_message_id: @@ -4429,3 +4429,4 @@ class Message(Object, Update): chat_id=self.chat.id, message_id=self.id ) +