mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-16 21:50:45 +00:00
test: simplify health account id collection
This commit is contained in:
@@ -95,7 +95,12 @@ function getTelegramChannelConfig(cfg: Record<string, unknown>) {
|
||||
function listTelegramAccountIdsForTest(cfg: Record<string, unknown>): string[] {
|
||||
const telegram = getTelegramChannelConfig(cfg);
|
||||
const accounts = telegram.accounts as Record<string, unknown> | undefined;
|
||||
const ids = Object.keys(accounts ?? {}).filter(Boolean);
|
||||
const ids: string[] = [];
|
||||
for (const accountId of Object.keys(accounts ?? {})) {
|
||||
if (accountId) {
|
||||
ids.push(accountId);
|
||||
}
|
||||
}
|
||||
return ids.length > 0 ? ids : ["default"];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user