load-fix
This commit is contained in:
parent
89827e3cc2
commit
444b504c95
|
@ -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
|
r = await create_chat(None, info, members=[1]) # member with id = 1 is discours
|
||||||
cids.append(r["chat"]["id"])
|
cids.append(r["chat"]["id"])
|
||||||
for cid in cids:
|
for cid in cids:
|
||||||
cid = cid.decode("utf-8")
|
c = await redis.execute("GET", f"chats/{cid}")
|
||||||
c = await redis.execute("GET", "chats/" + cid)
|
|
||||||
if c:
|
if c:
|
||||||
c = dict(json.loads(c))
|
c = dict(json.loads(c))
|
||||||
c["messages"] = await load_messages(cid, 5, 0)
|
c["messages"] = await load_messages(cid, 5, 0)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user