mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-23 23:34:28 +00:00
Fix story forward_from
This commit is contained in:
parent
51683934cd
commit
2ad31a63c3
@ -262,14 +262,14 @@ class Story(Object, Update):
|
|||||||
|
|
||||||
forward_header = story.fwd_from # type: raw.types.StoryFwdHeader
|
forward_header = story.fwd_from # type: raw.types.StoryFwdHeader
|
||||||
|
|
||||||
if forward_header and forward_header.from_id:
|
if forward_header:
|
||||||
raw_peer_id = utils.get_raw_peer_id(forward_header.from_id)
|
fwd_raw_peer_id = utils.get_raw_peer_id(forward_header.from_peer)
|
||||||
peer_id = utils.get_peer_id(forward_header.from_id)
|
fwd_peer_id = utils.get_peer_id(forward_header.from_peer)
|
||||||
|
|
||||||
if peer_id > 0:
|
if fwd_peer_id > 0:
|
||||||
forward_from = types.User._parse(client, users[raw_peer_id])
|
forward_from = types.User._parse(client, users[fwd_raw_peer_id])
|
||||||
else:
|
else:
|
||||||
forward_from_chat = types.Chat._parse_channel_chat(client, chats[raw_peer_id])
|
forward_from_chat = types.Chat._parse_channel_chat(client, chats[fwd_raw_peer_id])
|
||||||
forward_from_story_id = forward_header.story_id
|
forward_from_story_id = forward_header.story_id
|
||||||
|
|
||||||
if story.views:
|
if story.views:
|
||||||
|
Loading…
Reference in New Issue
Block a user