diff --git a/index.js b/index.js index 31b8a5f..ef75d62 100644 --- a/index.js +++ b/index.js @@ -675,7 +675,7 @@ class WhatsappCloud { }; } - async sendDocument({ recipientPhone, caption, file_path, url, mime_type }) { + async sendDocument({ recipientPhone, caption, file_path, url, mime_type, file_name }) { this._mustHaverecipientPhone(recipientPhone); if (file_path && url) { throw new Error( @@ -700,6 +700,7 @@ class WhatsappCloud { type: 'document', document: { caption: caption || '', + filename: file_name || "Unnamed file", }, }; diff --git a/package.json b/package.json index e9e0cae..c950c8b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "whatsappcloudapi_wrapper", - "version": "1.0.15", + "version": "1.0.16", "description": "Tired of doing things wrong? This package provides you with an easy way to get started and start building on the Whatsapp Cloud API. This is an unofficial wrapper for the Whatsapp Cloud API.", "main": "index.js", "author": "Daggie Blanqx",