From 49690081f90f56085c8ea7a195711dd8e6d35eac Mon Sep 17 00:00:00 2001 From: Felicio Mununga Date: Wed, 8 Jun 2022 16:18:01 +0200 Subject: [PATCH] use reverse() --- .../src/client/community/fetch-channel-chat-messages.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/status-js/src/client/community/fetch-channel-chat-messages.ts b/packages/status-js/src/client/community/fetch-channel-chat-messages.ts index f11ad79..b98c29a 100644 --- a/packages/status-js/src/client/community/fetch-channel-chat-messages.ts +++ b/packages/status-js/src/client/community/fetch-channel-chat-messages.ts @@ -100,7 +100,7 @@ export async function fetchMessages( }) if (remainingFetchedMessages.length) { - const _chunk = remainingFetchedMessages.splice(0) + const _chunk = remainingFetchedMessages.splice(0).reverse() const _messages = [..._chunk, ...fetchedMessages, ...storedMessages] callback(_messages)