From 67412d4fbafbc02b4f6e3703e25ff0f48e9e1f04 Mon Sep 17 00:00:00 2001 From: Adhiraj Date: Wed, 26 Aug 2020 10:56:47 +0530 Subject: [PATCH] Update 3.Connect.ts --- src/WAConnection/3.Connect.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/WAConnection/3.Connect.ts b/src/WAConnection/3.Connect.ts index 898656d..c38d17f 100644 --- a/src/WAConnection/3.Connect.ts +++ b/src/WAConnection/3.Connect.ts @@ -182,7 +182,7 @@ export class WAConnection extends Base { const timestamp = message.slice(1, message.length).toString ('utf-8') this.lastSeen = new Date(parseInt(timestamp)) } else { - const decrypted = Utils.decryptWA (message, this.authInfo.macKey, this.authInfo.encKey, new Decoder()) + const decrypted = Utils.decryptWA (message, this.authInfo?.macKey, this.authInfo?.encKey, new Decoder()) if (!decrypted) return const [messageTag, json] = decrypted