core-service-connector-fix

This commit is contained in:
2023-10-12 15:15:06 +03:00
parent 85fc48b3c8
commit f6ef50f878
3 changed files with 16 additions and 11 deletions

View File

@@ -51,7 +51,8 @@ async def load_chats(_, info, limit: int = 50, offset: int = 0):
members_online = (await redis.execute("SMEMBERS", "authors-online")) or []
chats = []
if len(cids) == 0:
r = await create_chat(None, info, members=[1]) # member with id = 1 is discours
print("[resolvers.load] no chats for user {}, create one with Discours (id=2)")
r = await create_chat(None, info, members=[2]) # member with id = 1 is discours
cids.append(r["chat"]["id"])
for cid in cids:
c = await redis.execute("GET", f"chats/{cid}")