From 526f5d9168bd3e156907fab019e540d3c992bd8c Mon Sep 17 00:00:00 2001 From: Adhiraj Date: Mon, 5 Oct 2020 12:04:53 +0530 Subject: [PATCH] Update Utils.ts --- src/WAConnection/Utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/WAConnection/Utils.ts b/src/WAConnection/Utils.ts index 049c0c9..0f7bfcd 100644 --- a/src/WAConnection/Utils.ts +++ b/src/WAConnection/Utils.ts @@ -30,7 +30,7 @@ export const waChatKey = (pin: boolean) => ({ compare: (k1: string, k2: string) => k2.localeCompare (k1) }) export const waMessageKey = { - key: (m: WAMessage) => toNumber (m.messageTimestamp).toString(16) + (10000 + (m['epoch'] || 0)).toString(16), + key: (m: WAMessage) => toNumber (m.messageTimestamp).toString(16).padStart(8, '0') + (5000 + (m['epoch'] || 0)).toString(16), compare: (k1: string, k2: string) => k1.localeCompare (k2) } export const WA_MESSAGE_ID = (m: WAMessage) => GET_MESSAGE_ID (m.key)