fix(Telegram Trigger Node): Fix issue with videos not being downloaded (#10007)

This commit is contained in:
Jon 2024-07-11 15:36:09 +01:00 committed by GitHub
parent 28ca7d6a2d
commit e84ab35c4a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View file

@ -7,6 +7,9 @@ interface EventBody {
document?: {
file_id: string;
};
video?: {
file_id: string;
};
}
export interface IEvent {

View file

@ -254,7 +254,8 @@ export class TelegramTrigger implements INodeType {
if (
(bodyData[key]?.photo && Array.isArray(bodyData[key]?.photo)) ||
bodyData[key]?.document
bodyData[key]?.document ||
bodyData[key]?.video
) {
if (additionalFields.imageSize) {
imageSize = additionalFields.imageSize as string;
@ -276,6 +277,8 @@ export class TelegramTrigger implements INodeType {
}
fileId = image.file_id;
} else if (bodyData[key]?.video) {
fileId = bodyData[key]?.video?.file_id;
} else {
fileId = bodyData[key]?.document?.file_id;
}