cached-request-9
Some checks failed
deploy / deploy (push) Failing after 1m1s

This commit is contained in:
2023-12-19 20:19:16 +03:00
parent 2380e88168
commit 2253bcf956
6 changed files with 26 additions and 56 deletions

View File

@@ -4,7 +4,7 @@ import uuid
from models.chat import Chat, ChatUpdate
from services.auth import login_required
from services.core import cached_authors
from services.core import get_all_authors
from services.presence import notify_chat
from services.rediscache import redis
from services.schema import mutation
@@ -50,10 +50,7 @@ async def update_chat(_, info, chat_new: ChatUpdate):
@login_required
async def create_chat(_, info, title="", members=None):
members = members or []
user_id = info.context["user_id"]
authors_by_user, authors_by_id = cached_authors
author = authors_by_user[user_id]
author_id = author["id"]
author_id = info.context["author_id"]
chat = None
if author_id:
if author_id not in members: