From 63680a3e9c4d9bce89c148c8c6b0f2ff2b911ef7 Mon Sep 17 00:00:00 2001 From: Evgenii Utkin Date: Tue, 3 Feb 2026 15:23:53 +0100 Subject: [PATCH] fix: Set video note follow-up text to undefined for empty input and adjust caption test expectation. --- src/telegram/send.ts | 2 +- src/telegram/send.video-note.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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");