From 3acc95447f1e8dda6a18cafb540a13113fe9b379 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 7 Dec 2022 16:18:03 -0600 Subject: [PATCH] Fix order of optimistic chat messages --- app/soapbox/queries/chats.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/soapbox/queries/chats.ts b/app/soapbox/queries/chats.ts index 15de81e9e..68fa7fc21 100644 --- a/app/soapbox/queries/chats.ts +++ b/app/soapbox/queries/chats.ts @@ -253,7 +253,6 @@ const useChatActions = (chatId: string) => { return { ...page, result: [ - ...page.result, normalizeChatMessage({ content: variables.content, id: String(Number(new Date())), @@ -262,6 +261,7 @@ const useChatActions = (chatId: string) => { pending: true, unread: true, }), + ...page.result, ], }; }