This commit is contained in:
Untone 2023-10-11 21:34:45 +03:00
parent 89827e3cc2
commit 444b504c95

View File

@ -52,8 +52,7 @@ async def load_chats(_, info, limit: int = 50, offset: int = 0):
r = await create_chat(None, info, members=[1]) # member with id = 1 is discours
cids.append(r["chat"]["id"])
for cid in cids:
cid = cid.decode("utf-8")
c = await redis.execute("GET", "chats/" + cid)
c = await redis.execute("GET", f"chats/{cid}")
if c:
c = dict(json.loads(c))
c["messages"] = await load_messages(cid, 5, 0)