fixes...
This commit is contained in:
@@ -20,10 +20,11 @@ async def update_chat(_, info, chat_new):
|
||||
"""
|
||||
author_id = info.context["author_id"]
|
||||
chat_id = chat_new["id"]
|
||||
chat = await redis.execute("GET", f"chats/{chat_id}")
|
||||
chat = (await redis.execute("GET", f"chats/{chat_id}"))
|
||||
if not chat:
|
||||
return {"error": "chat not exist"}
|
||||
chat = dict(json.loads(chat))
|
||||
else:
|
||||
chat = json.loads(chat)
|
||||
|
||||
if author_id in chat["admins"]:
|
||||
chat.update(
|
||||
|
Reference in New Issue
Block a user