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
Signed-off-by: eyMarv <[email protected]>
  • Loading branch information
eyMarv committed Mar 1, 2024
1 parent 2a85b3b commit 344233d
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 @@ -1262,11 +1262,11 @@ async def _parse(
)
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
)
Expand Down

0 comments on commit 344233d

Please sign in to comment.