From e9b2e555020727ef5895cf9e5e68b536c1f3da1d Mon Sep 17 00:00:00 2001 From: Untone Date: Fri, 13 Oct 2023 02:24:26 +0300 Subject: [PATCH] None-fix2 --- resolvers/load.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/resolvers/load.py b/resolvers/load.py index 322ac7c..eb34c13 100644 --- a/resolvers/load.py +++ b/resolvers/load.py @@ -45,8 +45,9 @@ async def load_messages(chat_id: str, limit: int = 5, offset: int = 0, ids=None) async def load_chats(_, info, limit: int = 50, offset: int = 0): """load :limit chats of current user with :offset""" author_id = info.context["author_id"] - cids = (list(await redis.execute("SMEMBERS", f"chats_by_author/{author_id}") or []) - )[offset:(offset + limit)] + cids = list( + (await redis.execute("SMEMBERS", f"chats_by_author/{author_id}")) or [] + )[offset:(offset + limit)] members_online = (await redis.execute("SMEMBERS", "authors-online")) or [] chats = [] if len(cids) == 0: