fix(telegram): skip nullish final text sends (land #30969 by @haosenwang1018)

Landed-from: #30969
Contributor: @haosenwang1018
Co-authored-by: Sense_wang <167664334+haosenwang1018@users.noreply.github.com>
This commit is contained in:
Peter Steinberger
2026-03-02 01:50:16 +00:00
parent dba039f016
commit a779c2ca6a
3 changed files with 22 additions and 1 deletions

View File

@@ -548,7 +548,7 @@ export const dispatchTelegramMessage = async ({
reasoningStepState.resetForNextStep();
}
const canSendAsIs =
hasMedia || typeof payload.text !== "string" || payload.text.length > 0;
hasMedia || (typeof payload.text === "string" && payload.text.length > 0);
if (!canSendAsIs) {
if (info.kind === "final") {
await flushBufferedFinalAnswer();