From b125638253a1176d26699707e77de4c5ab913173 Mon Sep 17 00:00:00 2001 From: Adhiraj Singh Date: Mon, 13 Jun 2022 12:53:20 +0530 Subject: [PATCH] fix: add missing "isLatest" flag --- src/Types/Events.ts | 2 +- src/Utils/process-message.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Types/Events.ts b/src/Types/Events.ts index e5dad7a..fb393b1 100644 --- a/src/Types/Events.ts +++ b/src/Types/Events.ts @@ -19,7 +19,7 @@ export type BaileysEventMap = { /** set messages (history sync), messages are reverse chronologically sorted */ 'messages.set': { messages: WAMessage[], isLatest: boolean } /** set contacts (history sync) */ - 'contacts.set': { contacts: Contact[] } + 'contacts.set': { contacts: Contact[], isLatest: boolean } /** upsert chats */ 'chats.upsert': Chat[] /** update the given chats */ diff --git a/src/Utils/process-message.ts b/src/Utils/process-message.ts index 7521001..4a980b4 100644 --- a/src/Utils/process-message.ts +++ b/src/Utils/process-message.ts @@ -91,7 +91,7 @@ const processMessage = async( } if(contacts.length) { - map['contacts.set'] = { contacts } + map['contacts.set'] = { contacts, isLatest } } if(didProcess) {