mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 06:34:05 -08:00
fix(Telegram Trigger Node): Fix issue with videos not being downloaded (#10007)
This commit is contained in:
parent
28ca7d6a2d
commit
e84ab35c4a
|
@ -7,6 +7,9 @@ interface EventBody {
|
|||
document?: {
|
||||
file_id: string;
|
||||
};
|
||||
video?: {
|
||||
file_id: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IEvent {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue