mirror of https://github.com/openclaw/openclaw.git
fix(telegram): debounce forwarded media-only bursts
This commit is contained in:
parent
094140bdb1
commit
1d7a287cf6
|
|
@ -211,12 +211,14 @@ export const registerTelegramHandlers = ({
|
|||
cfg,
|
||||
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) {
|
||||
return false;
|
||||
}
|
||||
if (entry.debounceLane === "forward") {
|
||||
return true;
|
||||
}
|
||||
return entry.allMedia.length === 0;
|
||||
},
|
||||
onFlush: async (entries) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue