This commit is contained in:
parent
c06dc5ebe7
commit
ca3ed334a9
|
@ -34,11 +34,11 @@ async def load_messages(chat_id: str, limit: int = 5, offset: int = 0, ids: Opti
|
|||
replies = []
|
||||
for m in messages:
|
||||
if m:
|
||||
rt = json.loads(m).get("replyTo")
|
||||
if rt:
|
||||
rt = int(rt)
|
||||
if rt not in message_ids:
|
||||
replies.append(rt)
|
||||
reply_to = json.loads(m).get("replyTo")
|
||||
if reply_to:
|
||||
reply_to = int(reply_to)
|
||||
if reply_to not in message_ids:
|
||||
replies.append(reply_to)
|
||||
if replies:
|
||||
messages += await load_messages(chat_id, offset, limit, replies)
|
||||
except Exception as e:
|
||||
|
|
Loading…
Reference in New Issue
Block a user