From f11c8c401feead229a6df3bf465d0b2f09540219 Mon Sep 17 00:00:00 2001 From: azudin Date: Mon, 5 Sep 2022 16:55:13 +0800 Subject: [PATCH] Fixed chats recent message Include message either fromMe is false or true --- src/Utils/history.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Utils/history.ts b/src/Utils/history.ts index 790bd87..4a92e80 100644 --- a/src/Utils/history.ts +++ b/src/Utils/history.ts @@ -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 }]