mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix(Telegram Trigger Node): Fix issue with videos not being downloaded (#10007)
This commit is contained in:
@@ -7,6 +7,9 @@ interface EventBody {
|
|||||||
document?: {
|
document?: {
|
||||||
file_id: string;
|
file_id: string;
|
||||||
};
|
};
|
||||||
|
video?: {
|
||||||
|
file_id: string;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IEvent {
|
export interface IEvent {
|
||||||
|
|||||||
@@ -254,7 +254,8 @@ export class TelegramTrigger implements INodeType {
|
|||||||
|
|
||||||
if (
|
if (
|
||||||
(bodyData[key]?.photo && Array.isArray(bodyData[key]?.photo)) ||
|
(bodyData[key]?.photo && Array.isArray(bodyData[key]?.photo)) ||
|
||||||
bodyData[key]?.document
|
bodyData[key]?.document ||
|
||||||
|
bodyData[key]?.video
|
||||||
) {
|
) {
|
||||||
if (additionalFields.imageSize) {
|
if (additionalFields.imageSize) {
|
||||||
imageSize = additionalFields.imageSize as string;
|
imageSize = additionalFields.imageSize as string;
|
||||||
@@ -276,6 +277,8 @@ export class TelegramTrigger implements INodeType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fileId = image.file_id;
|
fileId = image.file_id;
|
||||||
|
} else if (bodyData[key]?.video) {
|
||||||
|
fileId = bodyData[key]?.video?.file_id;
|
||||||
} else {
|
} else {
|
||||||
fileId = bodyData[key]?.document?.file_id;
|
fileId = bodyData[key]?.document?.file_id;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user