This commit is contained in:
Untone 2023-10-13 02:43:02 +03:00
parent c6698af97c
commit eab0e4cc48

View File

@ -57,7 +57,7 @@ async def load_chats(_, info, limit: int = 50, offset: int = 0):
for cid in cids: for cid in cids:
c = await redis.execute("GET", f"chats/{cid}") c = await redis.execute("GET", f"chats/{cid}")
if c: if c:
c = vars(json.loads(c)) c = json.loads(c)
c["messages"] = await load_messages(cid, 5, 0) c["messages"] = await load_messages(cid, 5, 0)
c["unread"] = await get_unread_counter(cid, author_id) c["unread"] = await get_unread_counter(cid, author_id)
member_ids = c["members"].copy() member_ids = c["members"].copy()