schema-fix
This commit is contained in:
parent
feb184d8e8
commit
9331c09526
|
@ -30,9 +30,10 @@ async def create_message(_, info, chat: str, body: str, replyTo=None):
|
||||||
"id": message_id,
|
"id": message_id,
|
||||||
"author": auth.user_id,
|
"author": auth.user_id,
|
||||||
"body": body,
|
"body": body,
|
||||||
"replyTo": replyTo,
|
|
||||||
"createdAt": int(datetime.now(tz=timezone.utc).timestamp()),
|
"createdAt": int(datetime.now(tz=timezone.utc).timestamp()),
|
||||||
}
|
}
|
||||||
|
if replyTo:
|
||||||
|
new_message = int(replyTo)
|
||||||
chat['updatedAt'] = new_message['createdAt']
|
chat['updatedAt'] = new_message['createdAt']
|
||||||
await redis.execute("SET", f"chats/{chat['id']}", json.dumps(chat))
|
await redis.execute("SET", f"chats/{chat['id']}", json.dumps(chat))
|
||||||
print(f"[inbox] creating message {new_message}")
|
print(f"[inbox] creating message {new_message}")
|
||||||
|
|
|
@ -505,7 +505,7 @@ type Message {
|
||||||
body: String!
|
body: String!
|
||||||
createdAt: Int!
|
createdAt: Int!
|
||||||
id: Int!
|
id: Int!
|
||||||
replyTo: String
|
replyTo: Int
|
||||||
updatedAt: Int
|
updatedAt: Int
|
||||||
seen: Boolean
|
seen: Boolean
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user