test: simplify health account id collection · openclaw/openclaw@4be8fd5
steipete
·
2026-05-09
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -95,7 +95,12 @@ function getTelegramChannelConfig(cfg: Record<string, unknown>) {
|
95 | 95 | function listTelegramAccountIdsForTest(cfg: Record<string, unknown>): string[] { |
96 | 96 | const telegram = getTelegramChannelConfig(cfg); |
97 | 97 | const accounts = telegram.accounts as Record<string, unknown> | undefined; |
98 | | -const ids = Object.keys(accounts ?? {}).filter(Boolean); |
| 98 | +const ids: string[] = []; |
| 99 | +for (const accountId of Object.keys(accounts ?? {})) { |
| 100 | +if (accountId) { |
| 101 | +ids.push(accountId); |
| 102 | +} |
| 103 | +} |
99 | 104 | return ids.length > 0 ? ids : ["default"]; |
100 | 105 | } |
101 | 106 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。