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 = []
|
replies = []
|
||||||
for m in messages:
|
for m in messages:
|
||||||
if m:
|
if m:
|
||||||
rt = json.loads(m).get("replyTo")
|
reply_to = json.loads(m).get("replyTo")
|
||||||
if rt:
|
if reply_to:
|
||||||
rt = int(rt)
|
reply_to = int(reply_to)
|
||||||
if rt not in message_ids:
|
if reply_to not in message_ids:
|
||||||
replies.append(rt)
|
replies.append(reply_to)
|
||||||
if replies:
|
if replies:
|
||||||
messages += await load_messages(chat_id, offset, limit, replies)
|
messages += await load_messages(chat_id, offset, limit, replies)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user