From e22b9aac1721ca1cebb81e972790a44fb59ff74a Mon Sep 17 00:00:00 2001 From: hzrd149 Date: Mon, 22 Apr 2024 10:09:09 -0500 Subject: [PATCH] fix created_at when publishing replies --- src/views/thread/components/reply-form.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/thread/components/reply-form.tsx b/src/views/thread/components/reply-form.tsx index 38e9f0865..c8dbcd336 100644 --- a/src/views/thread/components/reply-form.tsx +++ b/src/views/thread/components/reply-form.tsx @@ -85,7 +85,7 @@ export default function ReplyForm({ item, onCancel, onSubmitted, replyKind = kin }, [getValues().content, emojis]); const submit = handleSubmit(async (values) => { - const pub = await publish("Reply", draft); + const pub = await publish("Reply", { ...draft, created_at: dayjs().unix() }); if (pub && onSubmitted) onSubmitted(pub.event); });