Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
windkh committed May 13, 2021
1 parent 92c2859 commit 300747f
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions telegrambot/99-telegrambot.js
Original file line number Diff line number Diff line change
Expand Up @@ -1929,7 +1929,7 @@ module.exports = function (RED) {
});
}
break;

// TODO: https://github.com/windkh/node-red-contrib-telegrambot/issues/178
// https://github.com/yagop/node-telegram-bot-api/issues/876
case 'editMessageMedia':
Expand Down Expand Up @@ -2059,12 +2059,11 @@ module.exports = function (RED) {

// TODO: https://github.com/windkh/node-red-contrib-telegrambot/issues/178
// TODO: https://github.com/yagop/node-telegram-bot-api/issues/876
this.editMessageMedia = function (media, form = {}){

this.editMessageMedia = function (media, form = {}) {
const opts = {
qs: form,
};
opts.formData = {};
};
opts.formData = {};

const payload = Object.assign({}, media);
delete payload.media;
Expand All @@ -2076,17 +2075,17 @@ module.exports = function (RED) {
if (formData) {
opts.formData[attachName] = formData[attachName];
payload.media = `attach://${attachName}`;
} else {
} else {
payload.media = fileId;
}
}
} catch (ex) {
return Promise.reject(ex);
}

opts.qs.media = JSON.stringify(payload);
return node.telegramBot._request('editMessageMedia', opts);
}
};

this.on('input', function (msg, nodeSend, nodeDone) {
nodeSend =
nodeSend ||
Expand Down

0 comments on commit 300747f

Please sign in to comment.