pyproject-build

This commit is contained in:
2023-10-14 14:52:04 +03:00
parent bc2fc7c9a0
commit 499893e10b
13 changed files with 100 additions and 75 deletions

View File

@@ -1,7 +1,7 @@
import json
import uuid
from datetime import datetime, timezone
from validators.chat import Chat
from validators.inbox import Chat
from services.auth import login_required
from services.redis import redis
from services.schema import mutation
@@ -85,6 +85,9 @@ async def create_chat(_, info, title="", members=None):
for member_id in members:
await redis.execute("SADD", f"chats_by_author/{member_id}", chat_id)
print(f"[resolvers.chatss] creating: {chat}")
await redis.execute("SET", f"chats/{chat_id}", json.dumps(chat))
await redis.execute("SET", f"chats/{chat_id}/next_message_id", str(0))