mirror of
https://github.com/n8n-io/n8n.git
synced 2025-02-21 02:56:40 -08:00
⚡ Add extra larga size option to Telegram (#2827)
This commit is contained in:
parent
0a9ce092fc
commit
c026642f7b
|
@ -10,7 +10,9 @@ import {
|
|||
} from 'request';
|
||||
|
||||
import {
|
||||
IBinaryData, IDataObject, NodeApiError, NodeOperationError,
|
||||
IDataObject,
|
||||
NodeApiError,
|
||||
NodeOperationError,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
// Interface in n8n
|
||||
|
@ -185,6 +187,7 @@ export function getImageBySize(photos: IDataObject[], size: string): IDataObject
|
|||
'small': 0,
|
||||
'medium': 1,
|
||||
'large': 2,
|
||||
'extraLarge': 3,
|
||||
} as IDataObject;
|
||||
|
||||
const index = sizes[size] as number;
|
||||
|
|
|
@ -121,7 +121,7 @@ export class TelegramTrigger implements INodeType {
|
|||
name: 'download',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: `Telegram delivers the image in 3 sizes. By default, just the larger image would be downloaded. If you want to change the size, set the field 'Image Size'.`,
|
||||
description: `Telegram delivers the image in multiple sizes. By default, just the large image would be downloaded. If you want to change the size, set the field 'Image Size'.`,
|
||||
},
|
||||
{
|
||||
displayName: 'Image Size',
|
||||
|
@ -147,6 +147,10 @@ export class TelegramTrigger implements INodeType {
|
|||
name: 'Large',
|
||||
value: 'large',
|
||||
},
|
||||
{
|
||||
name: 'Extra Large',
|
||||
value: 'extraLarge',
|
||||
},
|
||||
],
|
||||
default: 'large',
|
||||
description: 'The size of the image to be downloaded',
|
||||
|
|
Loading…
Reference in a new issue