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