Fixed chats recent message

Include message either fromMe is false or true
This commit is contained in:
azudin
2022-09-05 16:55:13 +08:00
committed by Adhiraj Singh
parent 14def126cf
commit f11c8c401f

View File

@@ -53,7 +53,7 @@ export const processHistoryMessage = (
const curItem = recvChats[message.key.remoteJid!]
const timestamp = toNumber(message.messageTimestamp)
if(!message.key.fromMe && (!curItem || timestamp > curItem.lastMsgRecvTimestamp)) {
if(!curItem || timestamp > curItem.lastMsgRecvTimestamp) {
recvChats[chat.id] = { lastMsgRecvTimestamp: timestamp }
// keep only the most recent message in the chat array
chat.messages = [{ message }]