diff --git a/pyrogram/types/messages_and_media/message.py b/pyrogram/types/messages_and_media/message.py index 8929c1ccf..ef75f4abd 100644 --- a/pyrogram/types/messages_and_media/message.py +++ b/pyrogram/types/messages_and_media/message.py @@ -1258,9 +1258,7 @@ async def _parse( else: parsed_message.reply_to_story_id = message.reply_to.story_id parsed_message.reply_to_story_user_id = ( - message.reply_to.peer.getattr( - "user_id", message.reply_to.peer.getattr("channel_id", None) - ) + getattr(message.reply_to.peer, "user_id", getattr(message.reply_to.peer, "channel_id", None)) ) if replies: