From cea93aed47ae51895b0c2940daf4feadaadb07c6 Mon Sep 17 00:00:00 2001 From: Adhiraj Date: Sun, 9 Aug 2020 11:35:32 +0530 Subject: [PATCH] product message fix --- .gitignore | 1 + src/WAClient/Utils.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 11f028d..e62745a 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ package-lock.json package-lock.json decoded-ws.json auth_info2.json +lib diff --git a/src/WAClient/Utils.ts b/src/WAClient/Utils.ts index ad59d22..ca302cf 100644 --- a/src/WAClient/Utils.ts +++ b/src/WAClient/Utils.ts @@ -166,7 +166,7 @@ export function extensionForMediaMessage(message: WAMessageContent) { const getExtension = (mimetype: string) => mimetype.split(';')[0].split('/')[1] const type = Object.keys(message)[0] as MessageType let extension: string - if (type === MessageType.location || type === MessageType.liveLocation) { + if (type === MessageType.location || type === MessageType.liveLocation || type === MessageType.product) { extension = '.jpeg' } else { const messageContent = message[type] as