precache-fix
All checks were successful
deploy / deploy (push) Successful in 1m5s

This commit is contained in:
2023-12-19 18:13:37 +03:00
parent 531eb1f028
commit 95a237f349
8 changed files with 21 additions and 29 deletions

View File

@@ -3,7 +3,6 @@ import time
from models.chat import Message
from services.auth import login_required
from services.core import authors_by_user
from services.presence import notify_message
from services.rediscache import redis
from services.schema import mutation
@@ -13,10 +12,7 @@ from services.schema import mutation
@login_required
async def create_message(_, info, chat_id: str, body: str, reply_to=None):
"""Создание сообщения с телом :body для чата :chat_id с возможным ответом на :reply_to"""
user_id = info.context["user_id"]
author = authors_by_user[user_id]
author_id = author["id"]
author_id = info.context["author_id"]
# Получение данных чата из Redis
chat_data = await redis.execute("GET", f"chats/{chat_id}")