This commit is contained in:
@@ -8,7 +8,7 @@ from services.schema import mutation
|
||||
from models.chat import Message
|
||||
|
||||
|
||||
@mutation.field("createMessage")
|
||||
@mutation.field("create_message")
|
||||
@login_required
|
||||
async def create_message(_, info, chat_id: str, body: str, reply_to=None):
|
||||
"""Создание сообщения с телом :body для чата :chat_id с возможным ответом на :reply_to"""
|
||||
@@ -76,7 +76,7 @@ async def create_message(_, info, chat_id: str, body: str, reply_to=None):
|
||||
return {"message": new_message, "error": None}
|
||||
|
||||
|
||||
@mutation.field("updateMessage")
|
||||
@mutation.field("update_message")
|
||||
@login_required
|
||||
async def update_message(_, info, message):
|
||||
author_id = info.context["author_id"]
|
||||
@@ -144,7 +144,7 @@ async def delete_message(_, info, chat_id: str, message_id: int):
|
||||
return {}
|
||||
|
||||
|
||||
@mutation.field("markAsRead")
|
||||
@mutation.field("mark_as_read")
|
||||
@login_required
|
||||
async def mark_as_read(_, info, chat_id: str, message_id: int):
|
||||
author_id = info.context["author_id"]
|
||||
|
Reference in New Issue
Block a user