fix: fetchMessages after wwebjs update
This commit is contained in:
parent
bdb52e9ac1
commit
0940826e15
1 changed files with 2 additions and 2 deletions
|
|
@ -98,7 +98,7 @@ const patchWWebLibrary = async (client) => {
|
|||
if (searchOptions && searchOptions.since !== undefined && Number.isFinite(searchOptions.since) && m.t < searchOptions.since) {
|
||||
return false
|
||||
}
|
||||
if (searchOptions && searchOptions.messageId !== undefined && m.id.id != searchOptions.messageId) {
|
||||
if (searchOptions && searchOptions.messageId !== undefined && m.id.id !== searchOptions.messageId) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
|
|
@ -109,7 +109,7 @@ const patchWWebLibrary = async (client) => {
|
|||
|
||||
if (searchOptions && searchOptions.limit > 0) {
|
||||
while (msgs.length < searchOptions.limit) {
|
||||
const loadedMessages = await (window.require('WAWebChatLoadMessages')).loadEarlierMsgs(chat);
|
||||
const loadedMessages = await (window.require('WAWebChatLoadMessages')).loadEarlierMsgs({ chat })
|
||||
|
||||
if (!loadedMessages || !loadedMessages.length) break
|
||||
msgs = [...loadedMessages.filter(msgFilter), ...msgs]
|
||||
|
|
|
|||
Loading…
Reference in a new issue