fix: honor selected account in setup status

This commit is contained in:
Tak Hoffman
2026-04-03 11:48:58 -05:00
parent 5edefc4d5b
commit 51f6bc4940
19 changed files with 124 additions and 58 deletions

View File

@@ -122,11 +122,11 @@ export const telegramSetupWizard: ChannelSetupWizard = {
unconfiguredHint: "recommended · newcomer-friendly",
configuredScore: 1,
unconfiguredScore: 10,
resolveConfigured: ({ cfg }) =>
listTelegramAccountIds(cfg).some((accountId) => {
const account = inspectTelegramAccount({ cfg, accountId });
return account.configured;
}),
resolveConfigured: ({ cfg, accountId }) =>
(accountId ? [accountId] : listTelegramAccountIds(cfg)).some((resolvedAccountId) => {
const account = inspectTelegramAccount({ cfg, accountId: resolvedAccountId });
return account.configured;
}),
}),
prepare: async ({ cfg, accountId, credentialValues }) => ({
cfg: ensureTelegramDefaultGroupMentionGate(cfg, accountId),