mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
Fixed chats recent message
Include message either fromMe is false or true
This commit is contained in:
@@ -53,7 +53,7 @@ export const processHistoryMessage = (
|
|||||||
|
|
||||||
const curItem = recvChats[message.key.remoteJid!]
|
const curItem = recvChats[message.key.remoteJid!]
|
||||||
const timestamp = toNumber(message.messageTimestamp)
|
const timestamp = toNumber(message.messageTimestamp)
|
||||||
if(!message.key.fromMe && (!curItem || timestamp > curItem.lastMsgRecvTimestamp)) {
|
if(!curItem || timestamp > curItem.lastMsgRecvTimestamp) {
|
||||||
recvChats[chat.id] = { lastMsgRecvTimestamp: timestamp }
|
recvChats[chat.id] = { lastMsgRecvTimestamp: timestamp }
|
||||||
// keep only the most recent message in the chat array
|
// keep only the most recent message in the chat array
|
||||||
chat.messages = [{ message }]
|
chat.messages = [{ message }]
|
||||||
|
|||||||
Reference in New Issue
Block a user