This commit is contained in:
@@ -34,7 +34,7 @@ async def create_message(_, info, chat_id: str, body: str, reply_to=None):
|
||||
new_message: Message = {
|
||||
"chat_id": chat_id,
|
||||
"id": message_id,
|
||||
"author": author_id,
|
||||
"created_by": author_id,
|
||||
"body": body,
|
||||
"created_at": int(datetime.now(tz=timezone.utc).timestamp()),
|
||||
"updated_at": None,
|
||||
@@ -96,7 +96,7 @@ async def update_message(_, info, message):
|
||||
return {"error": "message not exist"}
|
||||
|
||||
message = json.loads(message)
|
||||
if message["author"] != author_id:
|
||||
if message["created_by"] != author_id:
|
||||
return {"error": "access denied"}
|
||||
|
||||
if body:
|
||||
|
Reference in New Issue
Block a user