This commit is contained in:
@@ -68,7 +68,7 @@ async def create_chat(_, info, title="", members=None):
|
||||
return {"chat": chat, "error": "existed"}
|
||||
|
||||
chat_id = str(uuid.uuid4())
|
||||
: Chat = {
|
||||
chat: Chat = {
|
||||
"id": chat_id,
|
||||
"members": members,
|
||||
"title": title,
|
||||
|
@@ -63,7 +63,7 @@ async def load_chats(_, info, limit: int = 50, offset: int = 0) -> Dict[str, Uni
|
||||
if len(cids) == 0:
|
||||
print(f"[resolvers.load] no chats for user with id={author_id}")
|
||||
r = await create_chat(None, info, members=[2]) # member with id = 2 is discours
|
||||
print(f"[resolvers.load] created chat: {r['chat']}")
|
||||
print(f"[resolvers.load] created chat: {r['chat_id']}")
|
||||
cids.append(r["chat"]["id"])
|
||||
all_authors: List[ChatMember] = await get_all_authors()
|
||||
authors = {a["id"]: a for a in all_authors}
|
||||
|
Reference in New Issue
Block a user