diff --git a/.DS_Store b/.DS_Store index 453e486..14f4dc6 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/WhatsAppWeb.Send.js b/WhatsAppWeb.Send.js index a196b2c..648f1d6 100644 --- a/WhatsAppWeb.Send.js +++ b/WhatsAppWeb.Send.js @@ -41,7 +41,7 @@ module.exports = { * @param {Date} [options.timestamp] optionally set the timestamp of the message in Unix time MS * @return {Promise<[object, object]>} */ - sendTextMessage: function (id, txt, options) { + sendTextMessage: function (id, txt, options={}) { if (typeof txt !== "string") { return Promise.reject("expected text to be a string") } @@ -67,7 +67,7 @@ module.exports = { * @param {Date} [options.timestamp] optionally set the timestamp of the message in Unix time MS * @return {Promise<[object, object]>} */ - sendMediaMessage: function (id, buffer, mediaType, options) { + sendMediaMessage: function (id, buffer, mediaType, options={}) { // path to upload the media const mediaPathMap = { imageMessage: "/mms/image",