mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-12 05:17:28 -08:00
🐛 Fix bug when sending audio with Telegram
🐛 fix bug when sending audio
This commit is contained in:
commit
b389ef116d
|
@ -42,6 +42,10 @@ export class Telegram implements INodeType {
|
|||
name: 'resource',
|
||||
type: 'options',
|
||||
options: [
|
||||
// {
|
||||
// name: 'Bot',
|
||||
// value: 'bot',
|
||||
// },
|
||||
{
|
||||
name: 'Chat',
|
||||
value: 'chat',
|
||||
|
@ -63,7 +67,31 @@ export class Telegram implements INodeType {
|
|||
description: 'The resource to operate on.',
|
||||
},
|
||||
|
||||
// ----------------------------------
|
||||
// operation
|
||||
// ----------------------------------
|
||||
|
||||
// {
|
||||
// displayName: 'Operation',
|
||||
// name: 'operation',
|
||||
// type: 'options',
|
||||
// displayOptions: {
|
||||
// show: {
|
||||
// resource: [
|
||||
// 'bot',
|
||||
// ],
|
||||
// },
|
||||
// },
|
||||
// options: [
|
||||
// {
|
||||
// name: 'Info',
|
||||
// value: 'info',
|
||||
// description: 'Get information about the bot associated with the access token.',
|
||||
// },
|
||||
// ],
|
||||
// default: 'info',
|
||||
// description: 'The operation to perform.',
|
||||
// },
|
||||
|
||||
// ----------------------------------
|
||||
// operation
|
||||
|
@ -926,6 +954,7 @@ export class Telegram implements INodeType {
|
|||
'sendPhoto',
|
||||
'sendSticker',
|
||||
'sendVideo',
|
||||
'sendAudio',
|
||||
],
|
||||
resource: [
|
||||
'message',
|
||||
|
@ -1554,7 +1583,10 @@ export class Telegram implements INodeType {
|
|||
body.title = this.getNodeParameter('title', i) as string;
|
||||
|
||||
}
|
||||
|
||||
// } else if (resource === 'bot') {
|
||||
// if (operation === 'info') {
|
||||
// endpoint = 'getUpdates';
|
||||
// }
|
||||
} else if (resource === 'file') {
|
||||
|
||||
if (operation === 'get') {
|
||||
|
@ -1746,6 +1778,13 @@ export class Telegram implements INodeType {
|
|||
}
|
||||
}
|
||||
|
||||
// if (resource === 'bot' && operation === 'info') {
|
||||
// responseData = {
|
||||
// user: responseData.result[0].message.from,
|
||||
// chat: responseData.result[0].message.chat,
|
||||
// };
|
||||
// }
|
||||
|
||||
returnData.push({ json: responseData });
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue