debug-load-messages
All checks were successful
deploy / deploy (push) Successful in 1m9s

This commit is contained in:
Untone 2023-10-16 23:00:07 +03:00
parent c06dc5ebe7
commit ca3ed334a9

View File

@ -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: