fix(telegram): gate media dedup on visible delivery · openclaw/openclaw@6bf9185
obviyus
·
2026-05-10
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | | -/** |
2 | | - * Deduplicate media URLs in a final-reply payload against media already |
3 | | - * delivered via block replies. Returns the deduplicated payload, or |
4 | | - * undefined if the payload should be skipped entirely (all media already |
5 | | - * sent and no text remains). |
6 | | - */ |
7 | 1 | export function deduplicateBlockSentMedia< |
8 | 2 | T extends { mediaUrl?: string; mediaUrls?: string[]; text?: string }, |
9 | 3 | >(payload: T, sentBlockMediaUrls: ReadonlySet<string>): T | undefined { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1166,10 +1166,6 @@ export const dispatchTelegramMessage = async ({
|
1166 | 1166 | recordInboundSession: context.turn.recordInboundSession, |
1167 | 1167 | record: context.turn.record, |
1168 | 1168 | runDispatch: () => { |
1169 | | -// Track media URLs delivered via block replies so final replies |
1170 | | -// can skip duplicates. Without this, non-streaming Telegram |
1171 | | -// delivers each MEDIA: attachment twice — once from the |
1172 | | -// media-only block reply and once from the final reply. |
1173 | 1169 | const sentBlockMediaUrls = new Set<string>(); |
1174 | 1170 | |
1175 | 1171 | return telegramDeps.dispatchReplyWithBufferedBlockDispatcher({ |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。