step-by-step-create-message-debug

This commit is contained in:
tonyrewin 2022-11-16 20:13:12 +03:00
parent 5704b08d12
commit 4278be2a0b

View File

@ -18,6 +18,8 @@ async def create_message(_, info, chat: str, body: str, replyTo=None):
return {
"error": "chat not exist"
}
else:
chat = json.loads(chat)
message_id = await redis.execute("GET", f"chats/{chat.id}/next_message_id")
message_id = int(message_id)
new_message = {