mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
sendMessageAction operation supports topics in supergroups
This commit is contained in:
parent
f003d939fc
commit
57a903cd5b
|
@ -118,14 +118,13 @@ export function addAdditionalFields(
|
|||
|
||||
Object.assign(body, additionalFields);
|
||||
|
||||
if (operation !== 'sendMediaGroup' && operation !== 'sendChatAction') {
|
||||
// Add the reply markup
|
||||
let replyMarkupOption = '';
|
||||
if (operation !== 'sendMediaGroup') {
|
||||
replyMarkupOption = this.getNodeParameter('replyMarkup', index) as string;
|
||||
if (replyMarkupOption === 'none') {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
body.reply_markup = {} as
|
||||
| IMarkupForceReply
|
||||
|
@ -181,6 +180,7 @@ export function addAdditionalFields(
|
|||
) as IMarkupReplyKeyboardOptions;
|
||||
Object.assign(body.reply_markup, replyKeyboardOptions);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1454,6 +1454,7 @@ export class Telegram implements INodeType {
|
|||
'editMessageText',
|
||||
'sendAnimation',
|
||||
'sendAudio',
|
||||
'sendChatAction',
|
||||
'sendDocument',
|
||||
'sendLocation',
|
||||
'sendMessage',
|
||||
|
@ -1506,7 +1507,7 @@ export class Telegram implements INodeType {
|
|||
default: false,
|
||||
displayOptions: {
|
||||
hide: {
|
||||
'/operation': ['editMessageText'],
|
||||
'/operation': ['editMessageText', 'sendChatAction'],
|
||||
},
|
||||
},
|
||||
description:
|
||||
|
@ -1627,7 +1628,7 @@ export class Telegram implements INodeType {
|
|||
type: 'number',
|
||||
displayOptions: {
|
||||
hide: {
|
||||
'/operation': ['editMessageText'],
|
||||
'/operation': ['editMessageText', 'sendChatAction'],
|
||||
},
|
||||
},
|
||||
default: 0,
|
||||
|
@ -1909,7 +1910,7 @@ export class Telegram implements INodeType {
|
|||
body.chat_id = this.getNodeParameter('chatId', i) as string;
|
||||
body.action = this.getNodeParameter('action', i) as string;
|
||||
|
||||
// Add additional fields (topic id)
|
||||
// Add additional fields
|
||||
addAdditionalFields.call(this, body, i);
|
||||
} else if (operation === 'sendDocument') {
|
||||
// ----------------------------------
|
||||
|
|
Loading…
Reference in a new issue