diff --git a/CHANGELOG.md b/CHANGELOG.md index 047bd89..e6f90a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # Changelog All notable changes to this project will be documented in this file. +# [14.8.2] - 2022-10-19 +### fixed editmessagemedia - [#277](https://github.com/windkh/node-red-contrib-telegrambot/issues/277) + # [14.8.1] - 2022-10-18 ### replaced performance.now - [#276](https://github.com/windkh/node-red-contrib-telegrambot/issues/276) diff --git a/package.json b/package.json index 9ac76c2..4719bbf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "node-red-contrib-telegrambot", - "version": "14.8.1", + "version": "14.8.2", "description": "Telegram bot nodes for Node-RED", "dependencies": { "bluebird": "^3.7.2", diff --git a/telegrambot/99-telegrambot.js b/telegrambot/99-telegrambot.js index e7aac56..88f0f33 100644 --- a/telegrambot/99-telegrambot.js +++ b/telegrambot/99-telegrambot.js @@ -2674,9 +2674,10 @@ module.exports = function (RED) { delete payload.media; delete payload.fileOptions; + let telegramBot = this.config.getTelegramBot(); + try { const attachName = String(0); - let telegramBot = this.config.getTelegramBot(); const [formData, fileId] = telegramBot._formatSendData(attachName, media.media, media.fileOptions); if (formData) { opts.formData[attachName] = formData[attachName];