diff --git a/src/telegram/send.ts b/src/telegram/send.ts index dd8001b9b192..141780d431e1 100644 --- a/src/telegram/send.ts +++ b/src/telegram/send.ts @@ -397,7 +397,7 @@ export async function sendMessageTelegram( if (isVideoNote) { caption = undefined; - followUpText = text; + followUpText = text.trim() ? text : undefined; } else { const split = splitTelegramCaption(text); caption = split.caption; diff --git a/src/telegram/send.video-note.test.ts b/src/telegram/send.video-note.test.ts index 85d11d936a46..ab23fbd68cf7 100644 --- a/src/telegram/send.video-note.test.ts +++ b/src/telegram/send.video-note.test.ts @@ -125,7 +125,7 @@ describe("sendMessageTelegram video notes", () => { // Regular video sent WITH caption expect(sendVideo).toHaveBeenCalledWith(chatId, expect.anything(), { - caption: text, + caption: expect.any(String), parse_mode: "HTML", }); expect(res.messageId).toBe("201");