From 9fb54c822c160611f78f08b9c3217dd0b11cb38b Mon Sep 17 00:00:00 2001 From: Anton Voylenko Date: Sun, 19 Nov 2023 17:31:27 +0200 Subject: [PATCH] fix string message without options --- src/controllers/clientController.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/clientController.js b/src/controllers/clientController.js index 0971e3dd..e0001ce9 100644 --- a/src/controllers/clientController.js +++ b/src/controllers/clientController.js @@ -73,7 +73,7 @@ const sendMessage = async (req, res) => { let messageOut switch (contentType) { case 'string': - if (options.media) { + if (options && options.media) { const media = options.media options.media = new MessageMedia(media.mimetype, media.data, media.filename = null, media.filesize = null) }