dict-fix
This commit is contained in:
parent
024eebcdea
commit
c6698af97c
|
@ -54,12 +54,10 @@ async def load_chats(_, info, limit: int = 50, offset: int = 0):
|
|||
r = await create_chat(None, info, members=[2]) # member with id = 2 is discours
|
||||
cids.append(r["chat"]["id"])
|
||||
|
||||
print(cids)
|
||||
|
||||
for cid in cids:
|
||||
c = await redis.execute("GET", f"chats/{cid}")
|
||||
if c:
|
||||
c = dict(json.loads(c))
|
||||
c = vars(json.loads(c))
|
||||
c["messages"] = await load_messages(cid, 5, 0)
|
||||
c["unread"] = await get_unread_counter(cid, author_id)
|
||||
member_ids = c["members"].copy()
|
||||
|
|
Loading…
Reference in New Issue
Block a user