author-id-fix
All checks were successful
deploy / deploy (push) Successful in 1m13s

This commit is contained in:
2023-11-28 12:05:39 +03:00
parent 15139249f1
commit c53b7a4c6c
7 changed files with 64 additions and 40 deletions

View File

@@ -101,7 +101,7 @@ async def update_message(_, info, message):
if body:
message["body"] = body
message["updated_at"] = int(datetime.now(tz=timezone.utc).timestamp())
message["updated_at"] = int(time.time())
await redis.execute("SET", f"chats/{chat_id}/messages/{message_id}", json.dumps(message))
@@ -114,7 +114,7 @@ async def update_message(_, info, message):
return {"message": message, "error": "cannot update, no message_id"}
@mutation.field("deleteMessage")
@mutation.field("delete_message")
@login_required
async def delete_message(_, info, chat_id: str, message_id: int):
author_id = info.context["author_id"]