From df29650b9832112fe01221ee4fd8d66f40c5ac85 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Tue, 9 Nov 2021 10:49:18 +0100 Subject: [PATCH] Always insert non-chathistory messages at the end --- state.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/state.js b/state.js index b4816f4..008bd8f 100644 --- a/state.js +++ b/state.js @@ -143,7 +143,7 @@ function updateMembership(membership, letter, add, client) { function insertMessage(list, msg) { if (list.length == 0) { return [msg]; - } else if (list[list.length - 1].tags.time <= msg.tags.time) { + } else if (!irc.findBatchByType(msg, "chathistory") || list[list.length - 1].tags.time <= msg.tags.time) { return list.concat(msg); }