Skip to content

Commit

Permalink
Pyrofork: fix some derps
Browse files Browse the repository at this point in the history
Signed-off-by: wulan17 <wulan17@nusantararom.org>
  • Loading branch information
wulan17 committed Oct 25, 2023
1 parent 59c3e33 commit 4de516e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 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 @@ -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
Expand Down
4 changes: 2 additions & 2 deletions pyrogram/types/messages_and_media/story.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 4de516e

Please sign in to comment.