fix(telegram): use generic type in deduplicateBlockSentMedia · openclaw/openclaw@b5af229
rogerdigital
·
2026-05-10
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -4,10 +4,10 @@
|
4 | 4 | * undefined if the payload should be skipped entirely (all media already |
5 | 5 | * sent and no text remains). |
6 | 6 | */ |
7 | | -export function deduplicateBlockSentMedia( |
8 | | -payload: { mediaUrls?: string[]; text?: string; [key: string]: unknown }, |
| 7 | +export function deduplicateBlockSentMedia<T extends { mediaUrls?: string[]; text?: string }>( |
| 8 | +payload: T, |
9 | 9 | sentBlockMediaUrls: ReadonlySet<string>, |
10 | | -): typeof payload | undefined { |
| 10 | +): T | undefined { |
11 | 11 | if (!payload.mediaUrls?.length || sentBlockMediaUrls.size === 0) { |
12 | 12 | return payload; |
13 | 13 | } |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。