diff --git a/src/structures/Chat.js b/src/structures/Chat.js index 5769ff1..93d9a0c 100644 --- a/src/structures/Chat.js +++ b/src/structures/Chat.js @@ -206,7 +206,7 @@ class Chat extends Base { if (searchOptions && searchOptions.limit > 0) { while (msgs.length < searchOptions.limit) { - const loadedMessages = await window.Store.ConversationMsgs.loadEarlierMsgs(chat); + const loadedMessages = await window.Store.ConversationMsgs.loadEarlierMsgs(chat,chat.msgs); if (!loadedMessages || !loadedMessages.length) break; msgs = [...loadedMessages.filter(msgFilter), ...msgs]; }