From af1d5f6a0167e8fc1ac34c0de2e0c69c7a9ff0e8 Mon Sep 17 00:00:00 2001 From: Adhiraj Singh Date: Sat, 16 Jul 2022 09:42:16 +0530 Subject: [PATCH] feat: use store.loadMessage for getMessage in example --- Example/example.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Example/example.ts b/Example/example.ts index 6a358d9..4d109a5 100644 --- a/Example/example.ts +++ b/Example/example.ts @@ -36,6 +36,12 @@ const startSock = async() => { msgRetryCounterMap, // implement to handle retries getMessage: async key => { + if(store) { + const msg = await store.loadMessage(key.remoteJid!, key.id!, undefined) + return msg?.message || undefined + } + + // only if store is present return { conversation: 'hello' }