Skip to content

Commit

Permalink
fix AttributeError: 'PeerUser' object has no attribute 'channel_id'
Browse files Browse the repository at this point in the history
  • Loading branch information
eyMarv authored Mar 1, 2024
1 parent 01f5a9d commit 8d9f613
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyrogram/types/messages_and_media/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -1143,9 +1143,9 @@ async def _parse(
parsed_message.reply_to_top_message_id = message.reply_to.reply_to_top_id
else:
parsed_message.reply_to_story_id = message.reply_to.story_id
if isinstance(message.reply_to, raw.types.PeerUser):
if isinstance(message.reply_to.peer, raw.types.PeerUser):
parsed_message.reply_to_story_user_id = message.reply_to.peer.user_id
elif isinstance(message.reply_to, raw.types.PeerChat):
elif isinstance(message.reply_to.peer, raw.types.PeerChat):
parsed_message.reply_to_story_chat_id = utils.get_channel_id(message.reply_to.peer.chat_id)
else:
parsed_message.reply_to_story_chat_id = utils.get_channel_id(message.reply_to.peer.channel_id)
Expand Down

0 comments on commit 8d9f613

Please sign in to comment.