Merge ffd6b65651159706422f5c90e106ec9d0698b8de into 598f1826d8b2bc969aace2c6459824737667218c

This commit is contained in:
thejavadude 2026-03-20 20:32:06 -07:00 committed by GitHub
commit ddc023694a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 3 deletions

View File

@ -305,8 +305,11 @@ export function createTelegramInboundBufferRuntime(params: {
const combinedText = entries
.map((entry) => entry.msg.text ?? entry.msg.caption ?? "")
.filter(Boolean)
.join("\n");
const combinedMedia = entries.flatMap((entry) => entry.allMedia);
.join("
");
// 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;
}

View File

@ -226,7 +226,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;
}