mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 20:14:51 +00:00
Fix sender retrieval of Story() object
This commit is contained in:
parent
517f2256b6
commit
7b107a69ef
1 changed files with 7 additions and 2 deletions
|
|
@ -230,8 +230,13 @@ class Story(Object, Update):
|
|||
)
|
||||
)
|
||||
if stories.from_id is not None:
|
||||
from_user = await client.get_users(stories.from_id.user_id)
|
||||
chat = types.Chat._parse_chat(client, chat.chats[0])
|
||||
if getattr(stories.from_id, "user_id", None) is not None:
|
||||
from_user = await client.get_users(stories.from_id.user_id)
|
||||
chat = types.Chat._parse_chat(client, chat.chats[0])
|
||||
elif getattr(stories.from_id, "channel_id", None) is not None:
|
||||
sender_chat = types.Chat._parse_chat(client, stories.from_id.channel_id)
|
||||
elif getattr(stories.from_id, "chat_id", None) is not None:
|
||||
sender_chat = types.Chat._parse_chat(client, stories.from_id.chat_id)
|
||||
else:
|
||||
sender_chat = types.Chat._parse_chat(client, chat.chats[0])
|
||||
elif isinstance(peer, raw.types.InputPeerSelf):
|
||||
|
|
|
|||
Loading…
Reference in a new issue