fix(telegram): warn when accounts.default is missing in multi-account setup (#32544)

Merged via squash.

Prepared head SHA: 7ebc3f65b2
Co-authored-by: Sid-Qin <201593046+Sid-Qin@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
This commit is contained in:
Sid
2026-03-03 16:27:19 +08:00
committed by GitHub
parent 2370ea5d1b
commit 4ffe15c6b2
13 changed files with 495 additions and 62 deletions

View File

@@ -0,0 +1,17 @@
export function formatChannelDefaultAccountPath(channelKey: string): string {
return `channels.${channelKey}.defaultAccount`;
}
export function formatChannelAccountsDefaultPath(channelKey: string): string {
return `channels.${channelKey}.accounts.default`;
}
export function formatSetExplicitDefaultInstruction(channelKey: string): string {
return `Set ${formatChannelDefaultAccountPath(channelKey)} or add ${formatChannelAccountsDefaultPath(channelKey)}`;
}
export function formatSetExplicitDefaultToConfiguredInstruction(params: {
channelKey: string;
}): string {
return `Set ${formatChannelDefaultAccountPath(params.channelKey)} to one of these accounts, or add ${formatChannelAccountsDefaultPath(params.channelKey)}`;
}