fix: Set video note follow-up text to undefined for empty input and adjust caption test expectation.

This commit is contained in:
Evgenii Utkin
2026-02-03 15:23:53 +01:00
committed by CLAWDINATOR Bot
parent eeeb80c1a2
commit 63680a3e9c
2 changed files with 2 additions and 2 deletions

View File

@@ -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;

View File

@@ -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");