fix: honor nostr setup default account

This commit is contained in:
Tak Hoffman
2026-04-03 13:12:41 -05:00
parent 13bc70397a
commit a89cb679a2
3 changed files with 18 additions and 5 deletions

View File

@@ -1310,7 +1310,7 @@ export async function promptParsedAllowFromForScopedChannel(params: {
export function createTopLevelChannelParsedAllowFromPrompt(params: {
channel: string;
defaultAccountId: string;
defaultAccountId: string | ((cfg: OpenClawConfig) => string);
enabled?: boolean;
noteTitle?: string;
noteLines?: string[];
@@ -1325,7 +1325,10 @@ export function createTopLevelChannelParsedAllowFromPrompt(params: {
...(params.enabled ? { enabled: true } : {}),
});
return createPromptParsedAllowFromForAccount({
defaultAccountId: params.defaultAccountId,
defaultAccountId:
typeof params.defaultAccountId === "function"
? params.defaultAccountId
: () => params.defaultAccountId,
...(params.noteTitle ? { noteTitle: params.noteTitle } : {}),
...(params.noteLines ? { noteLines: params.noteLines } : {}),
message: params.message,