mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-03 03:03:24 -04:00
fix: Set video note follow-up text to undefined for empty input and adjust caption test expectation.
This commit is contained in:
committed by
CLAWDINATOR Bot
parent
eeeb80c1a2
commit
63680a3e9c
@@ -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;
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user