mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 07:20:45 +00:00
fix(telegram): debounce forwarded media-only bursts
This commit is contained in:
@@ -211,12 +211,14 @@ export const registerTelegramHandlers = ({
|
|||||||
cfg,
|
cfg,
|
||||||
commandOptions: { botUsername: entry.botUsername },
|
commandOptions: { botUsername: entry.botUsername },
|
||||||
});
|
});
|
||||||
|
if (entry.debounceLane === "forward") {
|
||||||
|
// Forwarded bursts often split text + media into adjacent updates.
|
||||||
|
// Debounce media-only forward entries too so they can coalesce.
|
||||||
|
return hasDebounceableText || entry.allMedia.length > 0;
|
||||||
|
}
|
||||||
if (!hasDebounceableText) {
|
if (!hasDebounceableText) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (entry.debounceLane === "forward") {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return entry.allMedia.length === 0;
|
return entry.allMedia.length === 0;
|
||||||
},
|
},
|
||||||
onFlush: async (entries) => {
|
onFlush: async (entries) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user