From a96e69fae5dff7d969eb8ec626f8d3ff37b54d27 Mon Sep 17 00:00:00 2001 From: newwares Date: Wed, 13 Mar 2024 14:53:37 -0400 Subject: [PATCH] sort messages in ascending order --- src/plugins/findReply/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/findReply/index.tsx b/src/plugins/findReply/index.tsx index cef7a9fac..fe4102299 100644 --- a/src/plugins/findReply/index.tsx +++ b/src/plugins/findReply/index.tsx @@ -45,7 +45,7 @@ export default definePlugin({ channel: ChannelStore.getChannel(message.channel_id), onClick: async () => { const messages: Array = [...MessageStore.getMessages(message.channel_id)?._array ?? []].filter(m => !m.deleted).sort((a, b) => { - return b.timestamp.toString().localeCompare(a.timestamp.toString()); + return a.timestamp.toString().localeCompare(b.timestamp.toString()); }); // Need to deep copy Message array when sorting console.log(messages); let reply: Message | null = null;