Update 7.MessagesExtra.ts

This commit is contained in:
Adhiraj Singh
2020-12-29 11:09:21 +05:30
parent 3d6418e9d6
commit 26b15b2b78

View File

@@ -114,7 +114,7 @@ export class WAConnection extends Base {
const chat = this.chats.get (jid)
const hasCursor = cursor?.id && typeof cursor?.fromMe !== 'undefined'
const cursorValue = hasCursor && chat.messages?.get (GET_MESSAGE_ID(cursor))
const cursorValue = hasCursor && chat?.messages.get (GET_MESSAGE_ID(cursor))
let messages: WAMessage[]
if (chat?.messages && mostRecentFirst && (!hasCursor || cursorValue)) {