Add "sendMediaGroup" functionality to Telegram-Node #135

This commit is contained in:
Jan Oberhauser
2019-12-13 13:05:21 -06:00
parent 784aa25df8
commit 1d0a886d8b
2 changed files with 131 additions and 3 deletions

View File

@@ -73,10 +73,15 @@ export function addAdditionalFields(this: IExecuteFunctions, body: IDataObject,
const additionalFields = this.getNodeParameter('additionalFields', index) as IDataObject;
Object.assign(body, additionalFields);
const operation = this.getNodeParameter('operation', index) as string;
// Add the reply markup
const replyMarkupOption = this.getNodeParameter('replyMarkup', index) as string;
if (replyMarkupOption === 'none') {
return;
let replyMarkupOption = '';
if (operation !== 'sendMediaGroup') {
replyMarkupOption = this.getNodeParameter('replyMarkup', index) as string;
if (replyMarkupOption === 'none') {
return;
}
}
body.reply_markup = {} as IMarkupForceReply | IMarkupReplyKeyboardRemove | ITelegramInlineReply | ITelegramReplyKeyboard;