fix: apply same ghost media fix to runtime handler

This commit is contained in:
thejavadude 2026-03-18 20:49:43 -04:00
parent b56105f608
commit ffd6b65651

View File

@ -227,7 +227,9 @@ export const registerTelegramHandlers = ({
.map((entry) => entry.msg.text ?? entry.msg.caption ?? "")
.filter(Boolean)
.join("\n");
const combinedMedia = entries.flatMap((entry) => entry.allMedia);
// Fix: only use last entry's media to prevent ghost attachments from debounce buffer
// See: https://github.com/openclaw/openclaw/issues/46655
const combinedMedia = entries.at(-1)?.allMedia ?? [];
if (!combinedText.trim() && combinedMedia.length === 0) {
return;
}