From 4de516e0e8ffb27866753f3dd68203abeabc93af Mon Sep 17 00:00:00 2001 From: wulan17 Date: Wed, 25 Oct 2023 17:56:05 +0700 Subject: [PATCH] Pyrofork: fix some derps Signed-off-by: wulan17 --- pyrogram/types/messages_and_media/message.py | 4 ++-- pyrogram/types/messages_and_media/story.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pyrogram/types/messages_and_media/message.py b/pyrogram/types/messages_and_media/message.py index 196caee46..2b7867b64 100644 --- a/pyrogram/types/messages_and_media/message.py +++ b/pyrogram/types/messages_and_media/message.py @@ -640,10 +640,10 @@ async def _parse( service_type = enums.MessageServiceType.NEW_CHAT_PHOTO elif isinstance(action, raw.types.MessageActionRequestedPeer): if isinstance(action.peer, raw.types.PeerChannel): - channel_shared = int(f"-100{action.peer.channel_id}") + channel_shared = utils.get_channel_id(utils.get_raw_peer_id(action.peer)) service_type = enums.MessageServiceType.ChannelShared elif isinstance(action.peer, raw.types.PeerChat): - channel_shared = int(f"-100{action.peer.chat_id}") + channel_shared = utils.get_channel_id(utils.get_raw_peer_id(action.peer)) service_type = enums.MessageServiceType.ChannelShared elif isinstance(action.peer, raw.types.PeerUser): user_shared = action.peer.user_id diff --git a/pyrogram/types/messages_and_media/story.py b/pyrogram/types/messages_and_media/story.py index 935a693b1..cf99974ca 100644 --- a/pyrogram/types/messages_and_media/story.py +++ b/pyrogram/types/messages_and_media/story.py @@ -199,8 +199,8 @@ async def _parse( media_type = None else: media_type = None - if isinstance(peer, raw.types.PeerChannel): - sender_chat = await client.get_chat(peer.channel_id) + if isinstance(peer, raw.types.PeerChannel) or isinstance(peer, raw.types.InputPeerChannel): + sender_chat = await client.get_chat(utils.get_channel_id(peer.channel_id)) elif isinstance(peer, raw.types.InputPeerSelf): from_user = client.me else: