From 67b0e9e2dc356752f2ebc830832cb804de0c44c3 Mon Sep 17 00:00:00 2001 From: fruye Date: Thu, 27 Apr 2023 21:38:28 +0200 Subject: [PATCH] fix: Make statusModel `created_at` fields be ISO 8601 strings This makes the 'Reactions to this post' status (seen when viewing a status context) send the correct data type for `created_at` fields. https://docs.joinmastodon.org/entities/Account/#created_at https://docs.joinmastodon.org/entities/Status/#created_at --- packages/backend/src/server/api/mastodon/endpoints/status.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/server/api/mastodon/endpoints/status.ts b/packages/backend/src/server/api/mastodon/endpoints/status.ts index fcfbd6aaa..f7589569c 100644 --- a/packages/backend/src/server/api/mastodon/endpoints/status.ts +++ b/packages/backend/src/server/api/mastodon/endpoints/status.ts @@ -388,7 +388,7 @@ export function statusModel( emojis: MastodonEntity.Emoji[], content: string, ) { - const now = Math.floor(new Date().getTime() / 1000); + const now = new Date().toISOString(); return { id: "9atm5frjhb", uri: "https://http.cat/404", // ""