mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-16 04:35:24 +00:00
Fix parsing of pinned stories in case of channel
This commit is contained in:
parent
be19422153
commit
a5a44b8310
@ -192,8 +192,12 @@ class Story(Object, Update):
|
||||
r = await client.invoke(raw.functions.users.GetUsers(id=[raw.types.InputPeerSelf()]))
|
||||
peer_id = r[0].id
|
||||
users.update({i.id: i for i in r})
|
||||
elif isinstance(peer, (raw.types.InputPeerUser, raw.types.InputPeerChannel)):
|
||||
elif isinstance(peer, raw.types.InputPeerUser):
|
||||
peer_id = utils.get_input_peer_id(peer)
|
||||
elif isinstance(peer, raw.types.InputPeerChannel):
|
||||
peer_id = utils.get_input_peer_id(peer)
|
||||
r = await client.invoke(raw.functions.channels.GetChannels(id=[peer]))
|
||||
chats.update({peer_id: r.chats[0]})
|
||||
else:
|
||||
peer_id = utils.get_raw_peer_id(peer)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user