mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 12:04:51 +00:00
Update utils.py
fix AttributeError for MessageReplyStoryHeader missing user_id
This commit is contained in:
parent
cb38d6a02b
commit
9ec882ff06
1 changed files with 4 additions and 1 deletions
|
|
@ -134,7 +134,10 @@ async def parse_messages(
|
||||||
}
|
}
|
||||||
|
|
||||||
message_reply_to_story = {
|
message_reply_to_story = {
|
||||||
i.id: {'user_id': i.reply_to.user_id, 'story_id': i.reply_to.story_id}
|
i.id: {
|
||||||
|
'user_id': getattr(i.reply_to, 'user_id', None),
|
||||||
|
'story_id': getattr(i.reply_to, 'story_id', None)
|
||||||
|
}
|
||||||
for i in messages.messages
|
for i in messages.messages
|
||||||
if not isinstance(i, raw.types.MessageEmpty) and i.reply_to and isinstance(i.reply_to, raw.types.MessageReplyStoryHeader)
|
if not isinstance(i, raw.types.MessageEmpty) and i.reply_to and isinstance(i.reply_to, raw.types.MessageReplyStoryHeader)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue