This commit is contained in:
@@ -3,6 +3,7 @@ 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
|
||||
@@ -12,7 +13,10 @@ 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"""
|
||||
author_id = info.context["author_id"]
|
||||
|
||||
user_id = info.context["user_id"]
|
||||
author = authors_by_user[user_id]
|
||||
author_id = author["id"]
|
||||
|
||||
# Получение данных чата из Redis
|
||||
chat_data = await redis.execute("GET", f"chats/{chat_id}")
|
||||
|
Reference in New Issue
Block a user