mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 16:04:59 +00:00
fix(media): harden unknown mime handling from #39199 (thanks @nicolasgrasset)
Co-authored-by: Nicolas Grasset <nicolas.grasset@gmail.com>
This commit is contained in:
@@ -576,7 +576,8 @@ export async function sendMessageTelegram(
|
||||
fileName: media.fileName,
|
||||
});
|
||||
const isVideoNote = kind === "video" && opts.asVideoNote === true;
|
||||
const fileName = media.fileName ?? (isGif ? "animation.gif" : inferFilename(kind)) ?? "file";
|
||||
const fileName =
|
||||
media.fileName ?? (isGif ? "animation.gif" : inferFilename(kind ?? "document")) ?? "file";
|
||||
const file = new InputFile(media.buffer, fileName);
|
||||
let caption: string | undefined;
|
||||
let followUpText: string | undefined;
|
||||
|
||||
Reference in New Issue
Block a user