mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 12:04:51 +00:00
pyrofork: utils: Don't append message to messages_with_replies if reply_to_msg_id is None
Signed-off-by: wulan17 <wulan17@nusantararom.org>
This commit is contained in:
parent
00fed09311
commit
3622b13a9f
1 changed files with 6 additions and 1 deletions
|
|
@ -123,7 +123,12 @@ async def parse_messages(
|
||||||
messages_with_replies = {
|
messages_with_replies = {
|
||||||
i.id: i.reply_to.reply_to_msg_id
|
i.id: i.reply_to.reply_to_msg_id
|
||||||
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.MessageReplyHeader)
|
if (
|
||||||
|
not isinstance(i, raw.types.MessageEmpty)
|
||||||
|
and i.reply_to
|
||||||
|
and isinstance(i.reply_to, raw.types.MessageReplyHeader)
|
||||||
|
and i.reply_to.reply_to_msg_id is not None
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
message_reply_to_story = {
|
message_reply_to_story = {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue