mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 18:44:57 +00:00
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:
17
src/routing/default-account-warnings.ts
Normal file
17
src/routing/default-account-warnings.ts
Normal 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)}`;
|
||||
}
|
||||
Reference in New Issue
Block a user